Initialize the terminal. term Terminal name. If omitted, the value of the TERM environment variable will be used. fd File descriptor to which any initialization sequences will be sent. If not supplied, the file descriptor for sys.stdout will be used.