Python Error from Apress book
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Mon Jul 6 22:18:37 EDT 2009
En Mon, 06 Jul 2009 19:56:40 -0300, matt0177 <matt0177 at gmail.com> escribió:
> When I try to run the command as outlined in
> the book "simple_markup2.py < test_input.txt > test_output.html i get the
> following error every time.
>
> IOError: [Errno 9] Bad file descriptor
That's a Windows problem. When you execute the script as itself (either as
you do in the command line, or by double-clicking on it), it doesn't have
valid standard handles.
You have to invoke Python explicitely:
python simple_markup2.py < test_input.txt > test_output.html
(you may need to specify the full path to python.exe, or add the directory
where Python is installed to your system PATH).
--
Gabriel Genellina
More information about the Python-list
mailing list