title: Run python script from PyCharm. Import in Pycharm
body: <p>It seems like Pycharm 1.5.3 makes some magic, or I missed something.</p>
  
  <p>I have following file structure:</p>
  
  <pre><code>/sp
  /sp/tools.py
  /sp/test/main.py
  </code></pre>
  
  <p>Files contain following code</p>
  
  <p>main.py:</p>
  
  <pre><code>__author__ = 'username'
  import tools
  import sys
  
  def test1():
      print locals()
      print globals()
      print sys.path
      print test1
  
  if __name__ == '__main__':
      test1()
  </code></pre>
  
  <p>tools.py:</p>
  
  <pre><code>class SettingsDictionary(dict):
      def __init__(self, seq, **kwargs):
          dict.__init__(self, seq, **kwargs)
  </code></pre>
  
  <p>When I run main.py this is written in console:</p>
  
  <pre><code>C:\Python27\python.exe D:/Workspace/Python/sp/test/main.py
  {}
  {'test1': &lt;function test1 at 0x0143D0B0&gt;, '__warningregistry__': {("Not importing directory 'C:\\Program Files\\JetBrains\\PyCharm 1.5.3\\helpers\\tools': missing __init__.py", &lt;type 'exceptions.ImportWarning'&gt;, 2): True}, '__builtins__': &lt;module '__builtin__' (built-in)&gt;, '__file__': 'D:/Workspace/Python/sp/test/main.py', '__author__': 'p.grechishkin', 'sys': &lt;module 'sys' (built-in)&gt;, '__name__': '__main__', '__package__': None, 'tools': &lt;module 'tools' from 'D:\Workspace\Python\sp\tools.pyc'&gt;, '__doc__': None}
  ['D:\\Workspace\\Python\\sp\\test', 'C:\\Python27\\lib\\site-packages\\simplejson-2.1.6-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\django_staticfiles-1.1.2-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\django_appconf-0.4-py2.7.egg', 'C:\\Python27\\lib\\site-packages\\suds-0.4-py2.7.egg', 'C:\\Program Files\\JetBrains\\PyCharm 1.5.3\\helpers', 'D:\\Workspace\\Python\\sp', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Python27\\lib\\site-packages\\win32', 'C:\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\Python27\\lib\\site-packages\\Pythonwin']
  &lt;function test1 at 0x0143D0B0&gt;
  
  Process finished with exit code 0
  </code></pre>
  
  <p>I don't understand why import function knows about this module 'tools': .
  When I run this script from windows cmd - everything is okay. I get 'ImportError: No module named tools'</p>