From: skott1870 at my-dejanews.com (skott1870 at my-dejanews.com)
Date: Tue, 04 May 1999 16:32:55 GMT
Subject: Using os.popen with other python scripts
Message-ID: <7gn7fo$fqs$1@nnrp1.dejanews.com>
X-UID: 1756                                                


I'm having trouble using os.popen within a script to capture the output of
another script.
For example:

Script 1:

print "this is a test"

Script 2:

import os
x = os.popen('script1.py').readlines()
print x

Script2's output is just an empty list. I'm working on an NT system, through a
dos window.
Does anyone know what could be causing this behavior?

Thanks,
TST

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




