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()
=== EOF ===
Is the 'something()' line at the end in an ok location? I just put it
at the end.
Seems fine there. I'd add a comment like:
something() #initialize the frambus so the whatzies are set up.
Perhaps I'd choose better names :-)
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list