[Tutor] mscvrt module question

Tom Cloyd tomcloyd at bestmindhealth.com
Thu Jun 30 11:43:09 CEST 2005


Executing within Komodo 3.1, running python 2.4.1, it appears that when  
running my source file, python knows kbhit(), but not getch(). How can  
this be?

    KeyIn = getch()

   File "C:\Program Files\ActiveState Komodo  
3.1\dbgp\pythonlib\dbgp\client.py", line 1799, in runMain
     self.dbg.runfile(debug_args[0], debug_args)
   File "C:\Program Files\ActiveState Komodo  
3.1\dbgp\pythonlib\dbgp\client.py", line 1524, in runfile
     h_execfile(file, args, module=main, tracer=self)
   File "C:\Program Files\ActiveState Komodo  
3.1\dbgp\pythonlib\dbgp\client.py", line 590, in __init__
     execfile(file, globals, locals)
   File "C:\Documents and Settings\Tom C\My Documents\Python projects -  
Toms\quiz\quiz.py", line 13, in __main__
     KeyIn = getch()
NameError: name 'getch' is not defined


Also, the interpreter know neither. I don't get it --

a=kbhit()

Traceback (most recent call last):
[snip]
File "<console>", line 0, in __main__
NameError: name 'defined' is not defined


I don't know how to fix this, so any suggestions would be much appreciated.

-- t.

======================================================
Tom Cloyd
Bellingham, Washington, U.S.A: (360) 920-1226
<< BestMindHealth.com >>
======================================================

Using Opera's revolutionary e-mail client (program):  
http://www.opera.com/mail/


More information about the Tutor mailing list