title: How to batch reload the modules in Python?
body: <p>I have 2 self-defined packages <code>pac1</code> and <code>pac2</code>. I <strong>used to import</strong> all the modules <strong>one by one</strong> and <strong>reload them one by one</strong> after change, like so:</p>
  
  <pre><code>from pac1 import mod1
  from pac1 import mod2
  from pac1 import mod3
  from pac2 import mod4
  from pac2 import mod5
  
  reload(mod1)
  reload(mod2)
  reload(mod3)
  reload(mod4)
  reload(mod5)
  </code></pre>
  
  <p>Now, I learn that I <strong>can batch import</strong> the modules and improve the codes to:</p>
  
  <pre><code>from pac1 import *
  from pac2 import *
  
  reload(mod1)
  reload(mod2)
  reload(mod3)
  reload(mod4)
  reload(mod5)
  </code></pre>
  
  <p>But is this the best I can do? <strong>I mean can I reload all the packages in one go?</strong></p>
  
  <p><strong>UPDATE1</strong>: I am constantly modifying these modules. So after importing them at the start of the testing, I may need to frequently reload the modified modules to reflect the changes. This is the incentive for me to reload the modules.</p>
  
  <p><strong>UPDATE2</strong>: This process is not necessarily done dynamically. I just want to make my code more concise by fusing all those <code>reload()</code> into one.</p>