Re: Q on naming nested packages/modules

2009-09-01 Thread Stephen Hansen
> >> 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_

Re: Q on naming nested packages/modules

2009-09-01 Thread kj
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

Re: Q on naming nested packages/modules

2009-09-01 Thread Rami Chowdhury
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/

Re: Q on naming nested packages/modules

2009-09-01 Thread Terry Reedy
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

Re: Q on naming nested packages/modules

2009-09-01 Thread Carl Banks
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

Re: Q on naming nested packages/modules

2009-09-01 Thread Ethan Furman
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

Re: Q on naming nested packages/modules

2009-09-01 Thread kj
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

Re: Q on naming nested packages/modules

2009-09-01 Thread Benjamin Kaplan
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

Q on naming nested packages/modules

2009-09-01 Thread kj
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.eggs? Suppose I h