Using os.popen with other python scripts

Gordon McMillan gmcm at hypernet.com
Tue May 4 23:45:02 EDT 1999


Blake Winton wrote:

> On Tue, 4 May 1999 14:24:07 -0400, William Park <parkw at better.net>
> wrote:
> >I'm not familiar with NT system.  But, don't have to specify "python"
> >interpretor somewhere when you invoke script1?  Perhaps, script1.py is
> >missing
> >    #!/usr/local/bin/python
> >or script2.py needs 
> >    os.popen('python script1.py').readlines()
> 
> Not if the proper associations are set up in the registry...

Sorry Blake. While 'script1.py' works at the command line, file 
redirection is broken that way, (at least on NT). He needs to use 
os.popen('python script1.py').

- Gordon




More information about the Python-list mailing list