On 12/12/2009 4:07 AM, bobnotbob wrote:
I am calling external executable from my python program (using subprocess). This external program's output is a text file which I then read and parse. Is there any way to "sandbox" the calling of this external program so that it writes to a virtual file instead of the hardcoded text?
If the program writes its outputs to the stdout, you can redirect the program's stdout using subprocess, try to find a switch that will tell it to write to stdout. Otherwise, you're pretty much stuck to using a real file AFAIK.
-- http://mail.python.org/mailman/listinfo/python-list