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.

Author palm.kevin
Recipients palm.kevin
Date 2011-03-29.09:26:03
SpamBayes Score 1.2786072e-10
Marked as misclassified No
Message-id <1301390764.04.0.564019544953.issue11709@psf.upfronthosting.co.za>
In-reply-to
Content
The interactive help-method provided by python crashes when no stdin-stream is available (sys.stdin == None).
Exception:
  Traceback (most recent call last):
    File "MyScript", line 4, in <module>
    File "C:\Python32\lib\site.py", line 457, in __call__
      return pydoc.help(*args, **kwds)
    File "C:\Python32\lib\pydoc.py", line 1748, in __call__
      self.help(request)
    File "C:\Python32\lib\pydoc.py", line 1795, in help
      else: doc(request, 'Help on %s:', output=self._output)
    File "C:\Python32\lib\pydoc.py", line 1537, in doc
      pager(render_doc(thing, title, forceload))
    File "C:\Python32\lib\pydoc.py", line 1345, in pager
      pager = getpager()
    File "C:\Python32\lib\pydoc.py", line 1352, in getpager
      if not sys.stdin.isatty() or not sys.stdout.isatty():
  AttributeError: 'NoneType' object has no attribute 'isatty'


I think that this situation should be handled:
 - either by raising a clear error message indicating that help cannot be displayed because Python is executing in a non-interactive mode
 - either by simply printing documentation to stdout (like this: "print(sys.__doc__)")
History
Date User Action Args
2011-03-29 09:26:04palm.kevinsetrecipients: + palm.kevin
2011-03-29 09:26:04palm.kevinsetmessageid: <1301390764.04.0.564019544953.issue11709@psf.upfronthosting.co.za>
2011-03-29 09:26:03palm.kevinlinkissue11709 messages
2011-03-29 09:26:03palm.kevincreate