Guide to organizing modules?
workitharder at gmail.com
Fri Jun 6 03:16:39 CEST 2008
On Jun 5, 5:58 pm, alex23 <wuwe... at gmail.com> wrote:
> On Jun 6, 10:32 am, bukzor <workithar... at gmail.com> wrote:
> > In summary: are there any good (or official) guidelines for how to
> > organize and separate python functions and classes into modules?
> Hey bukzor,
> Are you familiar with the concept of packages in Python?
> That should allow you to keep all of your scriptlets as separate files
> while still having the advantage of keeping them in a single namespace
> for importing.
> (But if you know this already, don't mind me....)
Yes, in the above post I meant to say package where I said module.
Right now all my functions are in the __init__.py script, and I would
consider separating them out into sub-packages, if it had any rhyme or
reason, but right now that escapes me. That's mostly what I'm trying
to ask for.
More information about the Python-list