title: How to get the current working directory using python 3?
body: <p>When I run the following script in IDLE</p>
  
  <pre><code>import os
  print(os.getcwd())
  </code></pre>
  
  <p>I get output as</p>
  
  <pre><code>D:\testtool
  </code></pre>
  
  <p>but when I run from cmd prompt, I get</p>
  
  <pre><code>c:\Python33&gt;python D:\testtool\current_dir.py
  c:\Python33
  </code></pre>
  
  <p>How do I get same result which I got using IDLE ?</p>