$ pydoc -g. I'm a newbie programming in python, command not working

Hi,

I'm using IDLE to learn to program in Python on my mac (IDLE 2.7.1, OS 10.4.11). The book I'm using instructs me to enter this in the command line: $ pydoc -g

When I type that into IDLE, it says there is a syntax error with the $ symbol.

I'm sure there is a simple answer, but I'm lost at the moment. Thanks for your help.

667 mHz G4 titanium laptop, Mac OS X (10.4.11), running Python 2.7.1

Posted on Mar 7, 2011 10:02 AM

Reply
5 replies

Mar 7, 2011 3:05 PM in response to Tony T1

pydoc -g

press return when down typing.

is going to give a little surprise. It's a pop under panel. Terminal appears to hang.

You need to look around for the pydoc panel. I had to move my terminal window.

User uploaded file



as suggested, here is what I did in terminal
in /etc/bashrc
in /Users/mac/.bash_profile but claims to be -bash
in /Users/mac/config/profile.bash claims to be -bash
in . /sw/bin/init.sh
mac $
mac $ pydoc
pydoc - the Python documentation tool

pydoc <name> ...
Show text documentation on something. <name> may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If <name> contains a '/', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.

pydoc -k <keyword>
Search for a keyword in the synopsis lines of all available modules.

pydoc -p <port>
Start an HTTP server on the given port on the local machine.

pydoc -g
Pop up a graphical interface for finding and serving documentation.

pydoc -w <name> ...
Write out the HTML documentation for a module to a file in the current
directory. If <name> contains a '/', it is treated as a filename; if
it names a directory, documentation is written for all the contents.

mac $ pydoc -g



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

$ pydoc -g. I'm a newbie programming in python, command not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.