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?