[ python-Bugs-1348477 ] pydoc seems to run some scripts!
SourceForge.net
noreply at sourceforge.net
Tue Nov 8 12:09:02 CET 2005
Bugs item #1348477, was opened at 2005-11-04 17:10
Message generated for change (Comment added) made by olly
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1348477&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Demos and Tools
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Olly Betts (olly)
Assigned to: Nobody/Anonymous (nobody)
Summary: pydoc seems to run some scripts!
Initial Comment:
Ubuntu 5.10 "Breezy Badger"
Linux 2.6.10
Python 2.4.2
Running pydoc on some scripts (for example regextest.py
as supplied with python) just seems to hang:
pydoc
/usr/share/doc/python2.4/examples/Demo/comparisons/regextest.py
Feeding it EOF (Ctrl-D) makes it actually generate
documentation and exit.
But as well as showing the documentation, I get output
which appears to be the script actually having run with
itself as an argument!
----------------------------------------------------------------------
>Comment By: Olly Betts (olly)
Date: 2005-11-08 11:09
Message:
Logged In: YES
user_id=14972
So I guess this is a bug report for that missing check in
regextest.py in the python distribution.
Is running a script which is missing this check an inherent
feature of how pydoc works then?
----------------------------------------------------------------------
Comment By: Bob Ippolito (etrepum)
Date: 2005-11-08 02:45
Message:
Logged In: YES
user_id=139309
Some scripts are broken, this one is missing a check to see if it's a script
or a module:
if __name__ == "__main__": main()
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1348477&group_id=5470
More information about the Python-bugs-list
mailing list