[New-bugs-announce] [issue10877] Make Tools (and subdirs) a package (and subpackages)
Terry J. Reedy
report at bugs.python.org
Mon Jan 10 00:52:54 CET 2011
New submission from Terry J. Reedy <tjreedy at udel.edu>:
Given that sys.path includes ".../python32" adding the requisite empty __init__.py to Tools/ and, for instance, demo/ would allow
>>> from Tools.demo.redemo import main; main()
to work (I tried it with Scripts instead of demo in b2). Now I have to open an editor window and hit F5 to run. (On Windows, the Command Prompt window is so wretched that it is much easier to work and explore within a Python shell.)
Can files like __init__.py be added to the repository just by adding them to a checked-out working copy?
Would there be a reason to exclude any subdirectories (that have .py files)?
Can this be done for 3.2? I see that things have already been moved around within Tools since b2.
If there is a policy against this, perhaps Tools/README could mention it. In any case,
"This directory contains a number of Python programs that are useful"
should be edited to
"This directory contains a number of subdirectories with Python programs that are useful"
as *every* program has been put in a subdirectory, even if by itself.
components: Demos and Tools
title: Make Tools (and subdirs) a package (and subpackages)
type: feature request
versions: Python 3.2
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce