How to implement a standard logger and argparser for a package
<p>I am trying to implement a python build package and functional testing package for our internal software development processes.  My primary goal is to implement a global/standard logger (similar to the reference <a href="http://stackoverflow.com/questions/6150158/global-logger-how-to-implement">here</a>) and argparser that all modules will use from within their perspective packages (i.e. the build logger and parser will differ from the test suite logger and parser).</p>

<p>Should this be done in <code>__init__.py</code> of the package?  Are there any other methods to achieve this?  I have yet to see what the real need for <code>__init__.py</code> is?  Perhaps, this answered my own question? </p>

<p>I have written numerous python modules and other apps, but never packages/libraries.  This concept seems to introduce new possibilities for me, such as standardizing these processes.</p>

<p>Basically, to summarize, my goals for these packages are:</p>

<p>1.) Eliminate the need for redundant passing/parsing of long lists of arguments and/or accessing the system environment.</p>

<p>2.) Eliminate the myriad of outputs that we've seen in the past from varying tests and build scripts.</p>

<p>3.) Provide a self-documenting package that will be easy to use.  Any advice on package documentation would be extremely useful, as well. :)</p>

<p>This will enable users of these packages to:</p>

<p>1.) Easily access a standard set of arguments.  For example, every module in the package will (in order of precedence) parse command-line arguments with standard flags, load a config file, or use default values.</p>

<p>2.) Easily log errors, warnings, and debug statements in a standard way.</p>

<p>3.) As these test/build modules are passed around, this will ultimately enable "users" (i.e. someone who did not write the module) to run it in a universal way.</p>

<p>I suppose I am looking for some real "Pythonic" implementation advice because the variety of options and possibilities out there seem to be overwhelming.  Thanks in advance.</p>
