title: Import python script with arguments
body: <p>I have scripts:</p>
  
  <p><strong>moving1.py</strong>:</p>
  
  <pre><code>def move():
      print("walk!")
  </code></pre>
  
  <p><strong>moving2.py</strong>:</p>
  
  <pre><code>def move():
      print("run!")
  </code></pre>
  
  <p>And <strong>man.py</strong>, that can accept by argument parameter moving1 or moving2 script to act.</p>
  
  <p><strong>man.py</strong>:</p>
  
  <pre><code>import sys
  
  if len(sys.argv) &lt;= 1:
      exit("Too less arguments calling script")
  
  __import__(sys.argv[1])
  moving = sys.modules[sys.argv[1]]
  
  def move():
      moving.move()
  </code></pre>
  
  <p>Now I have testman.py script, that have to test all variants of man.py execution:</p>
  
  <p>testman.py</p>
  
  <pre><code>import man #and somehow add here as argument "moving1"
  man.move()
  
  import man #and somehow add here as argument "moving2"
  man.move()
  </code></pre>
  
  <p>There exist a lot of similar questions, but they don't do exactly what I want. How can I add arguments to imported scripts? Problem is not to check </p>
  
  <pre><code>if __name__ = "__main__":
  </code></pre>
  
  <p>there, problem is to import script exactly with parameters I want. Is it possible?</p>