Module Names with . (dots)?

activescott activescott at gmail.com
Mon Apr 6 00:26:44 CEST 2009


On Apr 5, 5:42 pm, Chris Rebert <c... at rebertia.com> wrote:
> On Sun, Apr 5, 2009 at 11:41 AM, activescott <activesc... at gmail.com> wrote:
> > My understanding is that module names must not have a dot in them. For
> > example, I tried to create a module like scott.appengine.util.py  and
> > put misc utility classes in there. However, python gives the error "No
> > module named scott.appengine.util". No I've read about packages
> > (http://docs.python.org/tutorial/modules.html#packages), but packages
> > appear to require a specific directory structure and several package
> > initialization files just to create a simple module with "pretty" dot
> > syntax. Am I missing something?
>
> I don't think so. As the Zen says, "Flat is better than nested" and
> "Simple is better than complex", so there's no need for your
> unnecessarily hierarchical name since it's not part of a package;
> either go with John's suggestion or rename your module to something
> even simpler (e.g. "saeutil").
>
> Cheers,
> Chris
>
> --
> I have a blog:http://blog.rebertia.com

Okay, thanks for the feedback guys.





More information about the Python-list mailing list