> >> An implication of all this is that if now I wanted to create a new
> >> module x.y.z.w, this means that the previously "leaf"-module x.y.z
> >> would become "non-leaf". In other words, I'd have to:
> >>
> >> 1. create the new directory x/y/z
> >> 2. *rename* the file x/y/z.py to x/y/z/__init_
In "Rami Chowdhury"
writes:
>> An implication of all this is that if now I wanted to create a new
>> module x.y.z.w, this means that the previously "leaf"-module x.y.z
>> would become "non-leaf". In other words, I'd have to:
>>
>> 1. create the new directory x/y/z
>> 2. *rename* the file x/y/z
An implication of all this is that if now I wanted to create a new
module x.y.z.w, this means that the previously "leaf"-module x.y.z
would become "non-leaf". In other words, I'd have to:
1. create the new directory x/y/z
2. *rename* the file x/y/z.py to x/y/z/__init__.py
3. create the file x/y/
kj wrote:
But now suppose that I want to factor out some code in spam/ham.py
to a helper module. (The reason behind factoring out this new
module is to "declutter" spam/ham.py, and improve its readibility.)
My instinct (from my Perl past) is to put this factored-out code
in a file spam/ham/egg
On Sep 1, 8:58 am, kj wrote:
> I'm having a hard time getting the hang of Python's package/module
> scheme. I'd like to find out what's considered best practice when
> dealing with the scenario illustrated below.
>
> The quick description of the problem is: how can I have two nested
> modules, sp
kj wrote:
In kj writes:
I'm having a hard time getting the hang of Python's package/module
scheme. I'd like to find out what's considered best practice when
dealing with the scenario illustrated below.
The quick description of the problem is: how can I have two nested
modules, spam.ham
In kj writes:
>I'm having a hard time getting the hang of Python's package/module
>scheme. I'd like to find out what's considered best practice when
>dealing with the scenario illustrated below.
>The quick description of the problem is: how can I have two nested
>modules, spam.ham and spam.ham
On Tue, Sep 1, 2009 at 11:58 AM, kj wrote:
>
>
>
> I'm having a hard time getting the hang of Python's package/module
> scheme. I'd like to find out what's considered best practice when
> dealing with the scenario illustrated below.
>
> The quick description of the problem is: how can I have two n