G
Guest
Does anyone know of a way I can make a program read/write from
stdin/stdout so that I can chain it with other commands and
interact with it from python? Unfortunately it's third party
software and thus can't be changed to do so. The program has
to be invoked 'program input.file output.file'. I would like
to do something like 'otherprog | program stdin stdout |
anotherprog' to take advantage of of the multiprocessor
environment I'm on.
I looked at the pipes module and it's really nice.
Unfortunately it breaks the command up and writes temp files
to overcome this, so it won't use multiple processes.
Any suggestions would be greatly appreciated.
I'm running Python 2.2.3 on a 24 processor IRIX64 6.5.14f.
Thanks,
Brian
stdin/stdout so that I can chain it with other commands and
interact with it from python? Unfortunately it's third party
software and thus can't be changed to do so. The program has
to be invoked 'program input.file output.file'. I would like
to do something like 'otherprog | program stdin stdout |
anotherprog' to take advantage of of the multiprocessor
environment I'm on.
I looked at the pipes module and it's really nice.
Unfortunately it breaks the command up and writes temp files
to overcome this, so it won't use multiple processes.
Any suggestions would be greatly appreciated.
I'm running Python 2.2.3 on a 24 processor IRIX64 6.5.14f.
Thanks,
Brian