sys.stdin.read() HELP!

Michael Hudson mwh at python.net
Wed Jul 4 07:21:00 EDT 2001


Andrey Revyakin <revyakag at umdnj.edu> writes:

> I have a cgi script which reads XML data from a FLASH5 movie. The script
> reads data into a string like this:
> 
> text = sys.stdin.read()
> 
> After I moved my scripts from a machine with python 1.7.2 to to a one

1.5.2, I presume?

> with python 2 .0, I started getting the following error:
> 
> text = sys.stdin.read()
> IOError: [Errno 9] Bad file descriptor
> 
> WHAT THE #$^ does that mean??? 

It means sys.stdin isn't attached properly.  This is unlikely to be
Python's fault, I'd have thought.  Can you shed a few more details as
to the environment you're working in?  Maybe somebody who has
experience in these things will be able to spot the mis-config (not
likely to be me).

Are you sure the version of Python is the only difference between the
two machines?

Cheers,
M.

-- 
  The only problem with Microsoft is they just have no taste.
              -- Steve Jobs, (From _Triumph of the Nerds_ PBS special)
                         and quoted by Aahz Maruch on comp.lang.python



More information about the Python-list mailing list