[ python-Bugs-1348477 ] pydoc seems to run some scripts!
SourceForge.net
noreply at sourceforge.net
Wed Nov 9 08:09:28 CET 2005
Bugs item #1348477, was opened at 2005-11-04 09:10
Message generated for change (Comment added) made by nnorwitz
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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Olly Betts (olly)
>Assigned to: Neal Norwitz (nnorwitz)
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: Neal Norwitz (nnorwitz)
Date: 2005-11-08 23:09
Message:
Logged In: YES
user_id=33168
I'm feeling generous tonight. :-)
Thanks for the report. I updated regextest program.
Committed revision 41414.
Committed revision 41415. (2.4)
----------------------------------------------------------------------
Comment By: Bob Ippolito (etrepum)
Date: 2005-11-08 08:13
Message:
Logged In: YES
user_id=139309
pydoc imports modules, it doesn't run scripts. It just so happens that
regextest isn't written correctly and does things it shouldn't do when
imported.
You should file a new bug on regextest.py, or at least change the summary
accordingly... but a new bug would end up in the summary again, and
would be more likely to be fixed.
----------------------------------------------------------------------
Comment By: Olly Betts (olly)
Date: 2005-11-08 03: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-07 18: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