kbhit() and getch() question

Chris Gonnerman chris.gonnerman at usa.net
Fri Mar 9 08:44:33 EST 2001


Dunno.  Check the version of your MSVCRT.DLL (mine is 6.10.8637.0).

Do Start, Find, Files or Folders.  Enter MSVCRT.DLL in Named: and your C:
drive
in Look In and do Find Now.  You may find more than one, but likely the one
in
c:\windows\system is the one being used.  (Do the find just in case there is
a
different version in your path... this could be your problem).

Right click on the file and select Properties, then click the Version tab.

You could also use SFC (the System File Checker) to install a "stock"
version
from your original master set.  This is not recommended unless you *know*
the
installed version is bad; however I might try it anyway since the previous
installed copy is backed up by SFC (so I could just put it back if I had
problems).

If this doesn't work we may need to try other voodoo.

----- Original Message -----
From: "Jeremy Reed" <jp_reed at yahoo.com>
To: "Chris Gonnerman" <chris.gonnerman at usa.net>
Sent: Friday, March 09, 2001 1:17 AM
Subject: Re: kbhit() and getch() question


> I am using python 2.0 and windows 98.  I checked the version just to be
> sure.  Do you have any idea what is causing the problem?
>
> --- Chris Gonnerman <chris.gonnerman at usa.net> wrote:
> > ----- Original Message -----
> > From: "Jeremy Reed" <jp_reed at yahoo.com>
> > Subject: kbhit() and getch() question
> >
> > > In a previous question, I asked how to get non-blocking input from
> > the
> > user.
> > > The answer proposed is as follows:
> > >
> > > import msvcrt
> > >
> > > ch = 0
> > > while ch != 'x':
> > >     if msvcrt.kbhit():
> > >         ch = msvcrt.getch()
> > >         print ch
> > >
> > > I have run into a few problems.  First of all, the kbhit() doesn't
> > seem to
> > > work.  I am unable to find a way for the function to return true.
> > [brutal hack]
> >
> > This code as given works for me on Win98SE, Python 2.0.  What is your
> > platform
> > and Python version?
> >
> >
>
>
> =====
>      ///////////  /////   /////  /////////////
>        /////      ///   ////    //  /////  //
>      //   //     ///////           /////
>      /////      ///   ////        /////
>  ///////////  /////    /////     /////
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>





More information about the Python-list mailing list