Nick Coghlan wrote:
Brett C wrote:
- Running a module as a script
That reminds me - the version of this that got checked in is restricted to top-level modules in order to keep things simple. I put a recipe up on the Python cookbook for those that wanted to be able to easily run scripts that live inside packages.
The recipe: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307772
(Hm, I was going to reply to the discussion there, but I think it's more appropriate here.) I understand the difficulty of implementing it, but as a user I find it a really really stupid restriction. I routively run (doc)tests of individual modules, which usually are submodules of a package. Using -m to do this would help me tremendously. As it stands, -m doesn't help me at all. I'd even go so far and -1 the entire feature if it doesn't support submodules. I guess it's too late for that :) Just