"pydoc mock" not working properly

S

skip

I just installed the latest version of mock (0.4.0) under both Python 2.6
and 2.7 (svn trunk). In both cases pydoc fails to find anything:

~% pydoc2.6 mock
no Python documentation found for 'mock'

~% pydoc2.7 mock
no Python documentation found for 'mock'

but this works from the interpreter prompt:

import mock
help(mock)

Is mock somehow "special" or am I expecting too much from pydoc?

Using Python 2.4 I get more troubling output:

Traceback (most recent call last):
File "/opt/app/bin/pydoc", line 5, in ?
pydoc.cli()
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 2243, in cli help.help(arg)
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1697, in help
elif request: doc(request, 'Help on %s:')
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1483, in doc pager(title % desc + '\n\n' + text.document(object, name))
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 303, in document
if inspect.ismodule(object): return self.docmodule(*args)
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/pydoc.py", line 1074, in docmodule
contents = [self.formattree(
File "/opt/app/g++lib6/python-2.4.5/lib/python2.4/inspect.py", line 583, in getclasstree
for parent in c.__bases__:
TypeError: iteration over non-sequence

but Python 2.4 is old enough I don't really expect anything to change here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top