[Grok-dev] allowing grokproject to create packages in a namespace

Brandon Craig Rhodes brandon at rhodesmill.org
Wed Dec 10 16:23:52 EST 2008

One of the bugs assigned to me is:


and it looks like a great idea: when you say "grokproject foo.bar",
instead of creating a broken Grok project (like it does right now),
grokproject could create an actual "foo.bar" project where "foo" has an
__init__.py and then a "bar" directory where the actual Grok project
package lives.

I'm willing to go code this up for grokproject.

But first, a question: should the __init__.py that's the only regular
file sitting in "foo" be empty (or a comment), or should it be that
little bit of magic that creates a namespace package?  That is, if the
user asks for a "foo.bar" project to be created, does this give us the
confidence to guess that they want "foo" to be a namespace package?  I
think it does, so my suggestion is we make the assumption.  But: should
there be an option to turn this off?  I don't see a reason for one, but
wanted a second opinion before writing some code.

Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon

More information about the Grok-dev mailing list