Re: non-standard module location (again)

2011-10-21 Thread Steven D'Aprano
On Fri, 21 Oct 2011 07:05:32 -0700, Shane wrote: > Need to refine a question I asked earlier. If I have a module, > > |-- foo > |---| > |---|---bar > |---|---| > |---|---|---__init__.py > > then I can say import foo.bar No you can't, not the way you have listed it. As s

Re: non-standard module location (again)

2011-10-21 Thread Calvin Spealman
I am biased, but you could use a plugin loader like straight.plugin at https://github.com/ironfroggy/straight.plugin On Fri, Oct 21, 2011 at 10:05 AM, Shane wrote: > Need to refine a question I asked earlier. If I have a module, > > |--  foo > |---| > |---|---bar > |---|---| > |--

Re: non-standard module location (again)

2011-10-21 Thread Ian Kelly
On Fri, Oct 21, 2011 at 8:05 AM, Shane wrote: > Need to refine a question I asked earlier. If I have a module, > > |--  foo > |---| > |---|---bar > |---|---| > |---|---|---__init__.py > > then I can say import foo.bar > > But suppose I want to import foo.bar.stuff and stuff

Re: non-standard module location (again)

2011-10-21 Thread 88888 Dihedral
1. Define a new class with an instance of the foo class included so that one can use all foo's properties and add new attributes. 2. Derive a new class from foo that extends its properties with the properties in foo accessible. -- http://mail.python.org/mailman/listinfo/python-list

non-standard module location (again)

2011-10-21 Thread Shane
Need to refine a question I asked earlier. If I have a module, |-- foo |---| |---|---bar |---|---| |---|---|---__init__.py then I can say import foo.bar But suppose I want to import foo.bar.stuff and stuff isn't located on under `bar' because it's user supplied code: |-