title: What is the most pythonic way to import modules in python
body: <p>Can anyone suggest me what is the most pythonic way to import modules in python? 
  Let me explain - i have read a lot of python code and found several different ways of how to import modules or if to be more precise - when to import:</p>
  
  <ol>
  <li>Use one module/several modules which include all the imports(third party modules) which are necessary for entire project so all of the imports are concentrated within few modules so it is easy to maintain imports. When any single module requires any module to be imported it ask references module for it. 
  For example in our project we have separated level named 'references' so it contains modules like 'system.py'(contains references to all system libraries), 'platform.py'(contains references to all platform libraries), 'devexpress.py'(contains references to all devexpress libraries) and so on. These modules looks like: </li>
  <li>Each module imports all necessary classes and functions at the top of the module - e.g. there is a section with imports within each module in project</li>
  <li>Each function/class uses import locally e.g right after definition and import only things that them really need.</li>
  </ol>
  
  <p>Please find samples below.</p>
  
  <h1>1 sample import module - only 'import' and 'from ... import ...' statements(no any methods or classes):</h1>
  
  <pre><code>#references.py
  import re
  import clr
  import math
  
  import System
  import System.Text.RegularExpressions
  import System.Random
  import System.Threading
  import System.DateTime
  
  # System assemblies
  
  clr.AddReference("System.Core")
  clr.AddReference("System.Data")
  clr.AddReference("System.Drawing")
  ...
  
  #test.py
  from references.syslibs import (Array, DataTable, OleDbConnection, OleDbDataAdapter,
                                   OleDbCommand, OleDbSchemaGuid)
  
  def get_dict_from_data_table(dataTable):
      pass
  </code></pre>
  
  <h1>2 module with 'import' and 'from ... import ...' as well as methods and classes:</h1>
  
  <pre><code>from ... import ...
  from ... import ...
  
  def Generate(param, param1 ...):
      pass
  </code></pre>
  
  <h1>3 module with 'import' and 'from ... import ...' statements which are used inside of methods and classes:</h1>
  
  <pre><code>import clr
  clr.AddReference("assembly")       
  
  from ... import ...
  ...
  
  def generate_(txt, param1, param2):
    from ... import ...
    from ... import ...
    from ... import ...
  
    if not cond(param1): res = "text"
    if not cond(param2): name = "default"
  </code></pre>
  
  <p>So what is the most pythonic way to import modules in python?</p>