winpexpect icon indicating copy to clipboard operation
winpexpect copied to clipboard

NameError: name 'tty' is not defined

Open moradimohamad opened this issue 7 years ago • 0 comments

import sys, winpexpect child = winpexpect.winspawn('nslookup') child.logfile = sys.stdout child.expect('\n>') child.sendline('www.google.com') child.expect('\n>') child.interact()

Traceback (most recent call last): File "C:\Users\mohamad\Desktop\test.py", line 5, in child.interact() File "C:\Users\mohamad\AppData\Local\Programs\Python\Python36-32\lib\site-packages\winpexpect-1.5-py3.6.egg\pexpect.py", line 1489, in interact mode = tty.tcgetattr(self.STDIN_FILENO) NameError: name 'tty' is not defined

moradimohamad avatar Feb 16 '19 16:02 moradimohamad