title: Pass a Python ArgumentParser to another module?
body: <p>I have this Python code in <code>main.py</code>:</p>
  
  <pre><code>parser = argparse.ArgumentParser()
  parser.add_argument("subname", help="Name of subreddit")
  args = parser.parse_args()
  </code></pre>
  
  <p>Then in another file <code>speciallogger.py</code>:</p>
  
  <pre><code>import logging
  import time
  
  from logging.handlers import TimedRotatingFileHandler
  path='logs/log_SUBNAMEHERE_logger.txt'
  logmsg = logging.getLogger("Rotating Log")
  fmt = u'%(asctime)s\t%(levelname)s\t%(filename)s:%(lineno)d\t%(message)s'
  logmsg.setLevel(logging.INFO)
  handler = TimedRotatingFileHandler(path, when="d", interval=1, backupCount=14)
  handler.setFormatter(logging.Formatter(fmt))
  logmsg.addHandler(handler)
  </code></pre>
  
  <p>The script (starts with <code>main.py</code>) executes via a cron using an argument.</p>
  
  <p>I need to pass that argument to <code>speciallogger.py</code> so I can name the filename what subname is, along with ensuring <code>logmsg</code> can be used across all modules without the log file being recreated each import during a script using multiple modules.</p>
  
  <p>How can I do this?</p>