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: use __name__ == '__main__' in tools/scripts (bug #624893)
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: akuchling, jlgijsbers
Priority: normal Keywords: patch

Created on 2004-08-08 12:32 by jlgijsbers, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
scripts-use-__main__.diff jlgijsbers, 2004-08-08 12:32
Messages (2)
msg46587 - (view) Author: Johannes Gijsbers (jlgijsbers) * (Python triager) Date: 2004-08-08 12:32
Many scripts in Tools/scripts don't use the __name__ ==
'__main__' check before running. This means pydoc can't
show their documentation. This patch adds this check to
all files in Tools/scripts and, for some, puts most of
the script in a main() function.

This fixes http://python.org/sf/624893.
msg46588 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-08-09 17:31
Logged In: YES 
user_id=11375

I was surprised to see that you haven't got checkin
privileges (or did I miss your ID on the SF list?); have you
considered requesting privileges?

Committed to CVS head as the following revisions:

byteyears.py: 1.11, checkpyc.py: 1.11, classfix.py: 1.14,
copytime.py:
1.6, crlf.py: 1.5, cvsfiles.py: 1.6, diff.py: 1.3,
dutree.py: 1.14,
findlinksto.py: 1.10, fixcid.py: 1.12, fixheader.py: 1.7,
fixps.py:
1.8, google.py: 1.3, gprof2html.py: 1.2, h2py.py: 1.19,
idle: 1.2,
ifdef.py: 1.7, lfcr.py: 1.5, linktree.py: 1.7, lll.py: 1.6,
logmerge.py: 1.13, methfix.py: 1.9, mkreal.py: 1.8,
objgraph.py: 1.8, pathfix.py: 1.7, pdeps.py: 1.7, ptags.py:
1.9, pydoc: 1.3,
pydocgui.pyw: 1.2, setup.py: 1.4, suff.py: 1.8, treesync.py:
1.7,
which.py: 1.14, xxci.py: 1.16
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40718
2004-08-08 12:32:47jlgijsberscreate