On Sat, May 24, 2008 at 2:11 PM, Gabriel Genellina <[EMAIL PROTECTED]> wrote:
> > 2. In the top of your package directory it is typical to have a module > name > > '_package.py'. This is ideally where the main command line entry point > for > > the package code should be placed. > > Why the underscore? And I usually don't put executable scripts inside a > package - I consider them just libraries, to be imported by other parts of > the application. > It's easier to test too when your tests *and* the application code are > external to the package itself. > Ok, guess using the '_package' name is not very common. I saw it used by the dbus module. My whole concern here is that using a script will fragment your application code across the file system. I would prefer to have it all in a single spot. So I still like they idea of keeping most of application code (argument parsing, help output, initialization) inside of the package. The '_' should indicate that any other modules using your package should import that module. - Casey
-- http://mail.python.org/mailman/listinfo/python-list