Project organization and import

Martin Unsal martinunsal at gmail.com
Tue Mar 6 13:58:14 EST 2007


On Mar 6, 10:13 am, "Chris Mellon" <arka... at gmail.com> wrote:
> You have to reload the importing module as well as the module that
> changed. That doesn't require rewriting the import infrastructure.

As far as I can tell, the moment you use "from foo_module import bar",
you've broken reload(). Reloading higher level packages doesn't help.
The only practical solution I can see is to rewrite __import__ and
reload.

> Thats not answering the question. Presumably you have some sort of
> organization for your code in mind.

I already gave a simple example. I thought you were asking why I would
want to organize code that way, and the only short answer is
experience. I'd prefer not to try to formulate a long answer because
it would be time consuming and somewhat off topic, but we can go there
if necessary.

Martin




More information about the Python-list mailing list