[Tutor] 'pydoc' is not recognized as an internal or external command, ...

R Johnson rhettbrindle at yahoo.com
Sat Nov 13 04:11:47 CET 2010


Thank you to all who have responded.
I have a bit of an update that reflects some of these suggestions. I was able to 
snag some time from one of the more experienced engineers and here is what we 
found:

On my system (Windows 7) the path to the lib file is C:\Python26\lib and 
"pydoc.py" is in this folder. So, he had me run: 

      python -m pydoc raw_input 
at that prompt. Sure enough, this returned what looked like help information for 
raw_input.

And, when we he had me follow the trail: Start > Control Panel > System > 
Advanced Settings > Environment Variables Python26 was in the PATH.





________________________________
From: Steven D'Aprano <steve at pearwood.info>
To: tutor at python.org
Sent: Fri, November 12, 2010 5:44:41 PM
Subject: Re: [Tutor] 'pydoc' is not recognized as an internal or external 
command, ...

R Johnson wrote:
> 'pydoc' is not recognized as an internal or external command, operable program 
>or batch file.

This means that the program "pydoc" is not installed on your computer, or is 
installed somewhere where the operating system (I'm guessing you're using 
Windows?) can't find it.

Use the Find File command, and see if you can find something called "pydoc". You 
may need to call the full path to the program, e.g.:

C:\My Documents\path\to\program\pydoc raw_input

or you may need to install it :)

> So, I go back to the terminal and type: python
> Then I type: pydoc raw_input
> The computer spits back: File "<stdin>", line1
>   pydoc raw_input
> SyntaxError: invalid syntax
> (There is a carrot symbol under the "t" of input.)

pydoc is an external tool made with Python, it is not a Python command you can 
run. However, Python does come with an internal tool that is nearly as powerful: 
help().

>From the Python prompt, type:

help(raw_input)

and Enter, and you will get something very close to what pydoc would have given 
you.



-- Steven
_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101112/4add4265/attachment-0001.html>


More information about the Tutor mailing list