[melbourne-pug] config files? pfft!

William ML Leslie william.leslie.ttg at gmail.com
Thu Feb 28 08:32:24 CET 2013


On 28 February 2013 18:09, Sam Watkins <sam at nipl.net> wrote:
> config files?  pfft!
>
> In python, one may put a program's settings in a separate python file,
> and simply import it (or from it import *).

Or more typically, execfile it - this means you don't have to mess
with the path [0], no .pyc is generated, and you can put objects into
the global namespace for the config file to use, no import required.

[0] A practice which is becoming more and more common because people
don't structure their projects properly.  It's tough to point fingers,
because a number of big-time python libraries do it too.

-- 
William Leslie


More information about the melbourne-pug mailing list