I'm trying to pipe data into a python program on Windows 2000, on the
dir | myProgram.py
Here's what I tried:
== readFromStdin.py ==
When I run it on Linux and Windows, results differ
ls -l | ./readFromStdin.py - Works on Linux
dir | readFromStdin.py - Doesn't work on win2000
IOError: [Errno 9] Bad file descriptor
The ultimate goal is to write python scripts that I can use from
Komodo's (Python IDE) Run Command feature. I'm running Komodo on
I want to highlight some text in Komodo, and run my command, pasting
the output of my program back in to the file I was editing in Komodo.
Komodo makes this easy with built-in commands like sort. You just
select the "Pass Selection As Input" and "Insert Output" options,
highlight some text, type "sort" in the Run Command box, and voila,
Komodo pipes your highlighted text to sort, and pastes the sorted text
back into your editor window.
I want to write a Python program that can behave in the same way as
sort does, for use with Komodo on Windows 2000.