title: Import statement in library definition does not seem to be executed
body: <p>I am having a problem that may be quite a basic thing, but as a Python learner I've been struggling with it for hours. The documentation has not provided me with an answer so far.</p>
  
  <p>The problem is that an import statement included in a module does not seem to be executed when I import this module from a python script. What I have is as follows:</p>
  
  <p>I have a file project.py (i.e. python library) that looks like this:</p>
  
  <pre><code>import datetime
  
  class Project:
      """ This class is a container for project data """
  
      title        = ""
      manager      = ""
      date         = datetime.datetime.min
  
      def __init__( self, title="", manager="", date=datetime.datetime.min ):
      """ Init function with some defaults """
  
          self.title        = title
          self.manager      = manager
          self.date         = date
  </code></pre>
  
  <p>This library is later used in a script (<code>file.py</code>) that imports project, it starts like this:</p>
  
  <pre><code>import project
  
  print datetime.datetime.min
  </code></pre>
  
  <p>The problem then arises when I try to execute this script with Python <code>file.py</code>. Python then complains with the folliwing NameError:</p>
  
  <pre><code>Traceback (most recent call last):
    File "file.py", line 3, in &lt;module&gt;
      print datetime.datetime.min
  NameError: name 'datetime' is not defined
  </code></pre>
  
  <p>This actually happens also if I try to make the same statements (<code>import</code> and <code>print</code>) directly from the Python shell.</p>
  
  <p>Shouldn't the <code>datetime</code> module be automatically imported in the precise moment that I call <code>import project</code>?</p>
  
  <p>Thanks a lot in advance.</p>