PyChecker and stdin

Olaf Meding OlafMeding at compuserve.com
Wed Mar 31 09:52:09 EST 2004


Turns out the that the function with the line of code PyChecker
complained about was called during import.  Thanks much for your help.

Olaf


Peter Hansen <peter at engcorp.com> wrote in message news:<eeydnYRUpqQM1_fdRVn-sQ at powergate.ca>...
> Olaf Meding wrote:
> 
> >>... put the failing code in a function ...
> > 
> > This line of code is already inside some function!
> >   s = sys.stdin.read(4)
> > Causes this PyChecker error:
> >   IOError: [Errno 9] Bad file descriptor
> > 
> > Any other ideas are greatly appreciated.  Thanks.
> 
> Are you _certain_ that this function is not being executed
> during import?  I'd be surprised if the form of the error
> messages (warnings?) which PyChecker outputs exactly matches
> what you show above, which strongly appears to be a standard
> Python exception (and which would therefore be generated _only_
> when the code is being executed).
> 
> Can you strip out all the non-relevant code in that module
> in such a way that it still produces the error, and post
> the failing code (assuming it's only a half dozen lines or
> so)?  Then at least someone else can try running it and
> see what's going on, or we can point out the error of your
> ways if that's the situation...
> 
> -Peter



More information about the Python-list mailing list