Re: Guidance on initialization code in a module

2009-06-16 Thread David Stanek
On Tue, Jun 16, 2009 at 4:54 PM, mrstevegross wrote: > Is there a common way to initialize various stuff in a module? That > is, I have some code in my module that I want to run whenever the > module is imported. Currently, my module looks like this: > > === foo.py === > def something(): >  ... > >

Re: Guidance on initialization code in a module

2009-06-16 Thread Dave Angel
mrstevegross wrote: Is there a common way to initialize various stuff in a module? That is, I have some code in my module that I want to run whenever the module is imported. Currently, my module looks like this: === foo.py === def something(): ... def somethingelse(): ... something() === E

Re: Guidance on initialization code in a module

2009-06-16 Thread Scott David Daniels
mrstevegross wrote: Is there a common way to initialize various stuff in a module? That is, I have some code in my module that I want to run whenever the module is imported. Currently, my module looks like this: === foo.py === def something(): ... def somethingelse(): ... something() === E

Guidance on initialization code in a module

2009-06-16 Thread mrstevegross
Is there a common way to initialize various stuff in a module? That is, I have some code in my module that I want to run whenever the module is imported. Currently, my module looks like this: === foo.py === def something(): ... def somethingelse(): ... something() === EOF === Is the 'someth