Issue 4671: pydoc executes the code to be documented (original) (raw)
Running pydoc [ pydoc ] on a python module using Tkinter displayed the window defined in the module - not what I was expecting.. Running pydoc on
from os import remove sFile='tmp.tmp' remove(sFile)
will remove the file tmp.tmp, if it exists. If this behaviour is intentional ( as it appears to be, see imp.load_module ) & presumably integral to the operation of pydoc, then it might be worth providing a warning on the web page ( http://docs.python.org/library/pydoc.html ) ?? Running a code with default arguments in an arbitrary directory could potentially produce unwanted side effects, at the very least.. Regards , Jim_C