Why doesn't response pydoc on my Python 2.7?

Laura Creighton lac at openend.se
Sat Dec 12 19:47:16 EST 2015


In a message of Sat, 12 Dec 2015 15:01:54 -0800, Robert writes:
>Hi,
>
>I want to use pydoc as some online tutorial shows, but it cannot run as 
>below. What is wrong?
>
>
>Thanks,
>
>
>
>
>>>> import pydoc
>>>> pydoc
><module 'pydoc' from 'C:\Python27\lib\pydoc.pyc'>
>>>> pydoc sys
>SyntaxError: invalid syntax
>>>> import sys
>>>> pydoc sys
>SyntaxError: invalid syntax
>>>> help(pydoc)
>Help on module pydoc:
>......
>-- 
>https://mail.python.org/mailman/listinfo/python-list

You aren't supposed to type 
pydoc sys
from __inside__ your python command interpreter.

You type this at a command prompt.

Laura



More information about the Python-list mailing list