May 08, 2007 4:17 PM
To: python-list@python.org
Subject: Using os.popen and os.chdir together
Within a script on a *nix machine, I use os.chdir then os.popen, and it
appears to me as though the os.chdir had no effect so far as the
os.popen is concerned. Why's that? Here's what
Within a script on a *nix machine, I use os.chdir then os.popen, and it
appears to me as though the os.chdir had no effect so far as the
os.popen is concerned. Why's that? Here's what I'm doing:
>>> import os
>>> os.path.realpath( os.curdir )
'/home/jlooney'
>>> print os.popen( "echo $PWD" ).rea