title: calling modules hierarchy python
body: <br>
  in python when I need to use a function I have to import the entire module or the specific function in the module. <br>
  What if I import directly a module and the same module is imported from another module that  I import later? <br>Just for example in a hypothetical `myapp.py` there are theese three rows: <br>
  <pre><code>import module1
  import module2
  import module3
  </code></pre>
  <p>in <code>module1.py</code> there are other importing instructions like</p>
  <pre><code>import mymodule
  import module2
  import module4
  </code></pre>
  <p>The chain of import modules can ben longer than that in a regular application.<br>
  If I well understood when I run <code>myapp.py</code> the interpreter runs the first line <code>import module1</code> and then opens <code>module1.py</code> and start processing it, starting from its first line <code>import mymodule</code> then the second <code>import module2</code> and so on. But when returning to second line of <code>myapp.py</code> it has to process</p>
  <pre><code>import module2
  </code></pre>
  <p>that has been already processed!
  What does happens in that situation?<br>
  I have to be aware of all the duplicating coding calls or simply python itself discard the second <code>import module2</code> call because he knows it has already done the <code>import</code>?<br>
  In big (and usual) apps, it's common to use very large amount of libraries (modules): how can I check all the cross calls between modules and secondly should I worry about it?<br>
  Regards, Marco</p>