Re: Global utility module/package

2006-05-09 Thread Kent Johnson
Christoph Haas wrote: > Evening, > > I'm currently working on a larger Python project that consists of multiple > programs and packages. As I need a few utility functions time and again I > moved them all into a Utility package and created a class there. ... > As I know that importing packages fro

Re: Global utility module/package

2006-05-08 Thread Scott David Daniels
Christoph Haas wrote: > As I know that importing packages from multiple modules always keeps it a > singleton I thought of something like this: > > Util.py: > > debugFlag = False > vibranceLevel = 'good' > > def function1(): >global debugFlag >print debugFlag The global line is

Global utility module/package

2006-05-08 Thread Christoph Haas
Evening, I'm currently working on a larger Python project that consists of multiple programs and packages. As I need a few utility functions time and again I moved them all into a Utility package and created a class there. Like this: Util.py: class Util: def __init__(self, debugFlag=F