title: How do I get the full path of the current file's directory?
body: <p>How do I get the current file's directory path?
  I tried:</p>
  <pre><code>&gt;&gt;&gt; os.path.abspath(__file__)
  'C:\\python27\\test.py'
  </code></pre>
  <p>But I want:</p>
  <pre><code>'C:\\python27\\'
  </code></pre>