Hi
List,
I wanted to take the
stdout of a process and redirect it to stdin of a python script, then after
playing with the input in the script I want to send it back to stdout (all of
this to be done while the original process runs happily along). I can't
seem to figure out the correct syntax if this is possible.
e.g.
C:\> runner.exe |
script.py
C:\> runner.exe
> script.py # this overwrites your script!:-)
e.g.
#!/usr/bin/env
python
import
re
while
1:
packet = sys.stdin.read()
if field in packet:
# change it and put it back on the command window and
get the next bunch of stuff
sys.stdout.write()
I hope my
question/intention is clear.
Thanks to the
list! This is the best list I've ever belonged to. There are a lot
of knowledgeable people who help, and no one ever flames you for asking
questions out of ignorance.
Thanks,
Frank
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor