title: import argparse fails, some setup/path issue?
body: <p>I've written as minimal a python program using argparse as I can. Just three lines.</p>
  
  <pre><code>import argparse
  if __name__ == "__main__":
      print "Hello World"
  </code></pre>
  
  <p>It gets the following error: </p>
  
  <blockquote>
    <p>File "/Users/pfarrell/sandbox/dbms/extractor/src/extractor.py", line
    2, in 
        import argparse ImportError: No module named argparse</p>
  </blockquote>
  
  <p>This is the first python program I've ever written, so I can easily believe that I've not properly setup some python library path, etc.</p>
  
  <p>This is running on OS-X</p>
  
  <pre><code>python --version  
  Python 2.7.1  
  pfarrell@way:~/sandbox/dbms/extractor/src$ python -c "import argparse; print argparse"  
  &lt;module 'argparse' from '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.pyc'&gt;
  </code></pre>
  
  <p>More testing (thanks to the comments) </p>
  
  <p>running it explicitly in the shell works, but running it inside netbeans fails:</p>
  
  <h3>shell only</h3>
  
  <pre><code>python extractor.py -h  
  Hello World  
  usage: extractor.py [-h]  
  
  optional arguments:  
    -h, --help  show this help message and exit  
  </code></pre>
  
  <p>Running it as a script shows a completely different path. Looks like the netbeans setup needs a tweak or two</p>
  
  <pre><code>./extractor.py  -h  
  /Users/pfarrell/sandbox/dbms/extractor/src  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib- scriptpackages  
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python    
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old  
  /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload  
  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC  
  /Library/Python/2.7/site-packages  
  Hello World  
  </code></pre>
  
  <h3>executing inside netbeans</h3>
  
  <pre><code>/Users/pfarrell/sandbox/dbms/extractor/src  
  /Users/pfarrell/Library/Application Support/NetBeans/7.2.1/jython-2.5.1/Lib  
  /Users/pfarrell/Library/Application Support/NetBeans/7.2.1/jython-2.5.1/Lib/site-packages  
  /Users/pfarrell/sandbox/dbms/extractor/src  
  __classpath__  
  __pyclasspath__/  
  Hello World
  </code></pre>