RE: Using os.popen and os.chdir together

2007-05-08 Thread Looney, James B
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

Using os.popen and os.chdir together

2007-05-08 Thread Looney, James B
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