This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Make Tools (and subdirs) a package (and subpackages)
Type: enhancement Stage:
Components: Demos and Tools Versions: Python 3.2
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, georg.brandl, terry.reedy
Priority: normal Keywords:

Created on 2011-01-09 23:52 by terry.reedy, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg125875 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-01-09 23:52
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.
msg125985 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2011-01-11 08:05
I don't think this is a good idea.  For one thing, it only works in a checkout or source tarball, something that most users aren't going to work with.

If we now publish that they can do "import Tools.demo.redemo" and so on, confusion will be great among those whose installation doesn't include Tools.  In effect, you've added a new (and huge!) standard library package, and that's not something we do lightly or just before rc :)

Also, Tools is mostly interesting for developers only.  I'd rather put the things useful for users into the standard library at some point.
History
Date User Action Args
2022-04-11 14:57:11adminsetgithub: 55086
2011-01-11 08:05:55georg.brandlsetstatus: open -> closed

messages: + msg125985
resolution: rejected
2011-01-10 02:19:05eric.araujosetnosy: + eric.araujo
2011-01-09 23:53:50terry.reedysetnosy: + georg.brandl
2011-01-09 23:52:51terry.reedycreate