title: Python os.system() call runs in incorrect directory
body: <p>My coworker is having trouble with a Python install.  When running the code below, from <code>'C:\my\folder\'</code>, <code>'C:\'</code> is returned instead of the current working directory.  When I or anyone else run the script on our systems, we get <code>'C:\my\folder\'</code>.  </p>
  
  <p>We're assuming that some global setting must be causing the issue, so I've had the person uninstall Python, delete the local Python2.7 folder, clean the registry and reinstall the Python, but it's still not working.</p>
  
  <p>NOTE:  We have a large number of legacy scripts, so revising all of them to use subprocess is impractical. :(</p>
  
  <p>Any ideas?</p>
  
  <p>Environment:  Windows XP, Python 2.7</p>
  
  <pre><code>import os
  
  #
  #  This test script demonstrates issue on the users computer when python invokes
  #  a subshell via the standard os.system() call.
  #
  
  print "This is what python thinks the current working directory is..."
  print os.getcwd()
  print
  print
  
  print "but when i execute a command *from* python, this is what i get for the current working directory"
  os.system('echo %cd%')
  
  raw_input()
  </code></pre>