>>> import pydoc import sys sys.version
'2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]' pydoc sys
SyntaxError: invalid syntax
The documentation for pydoc says:
"Run "pydoc <name>" to show documentation on something."
What am I missing?
Thanks!
Chris 9 22609 ne********@cox.net wrote: import pydoc import sys sys.version '2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]' pydoc sys SyntaxError: invalid syntax The documentation for pydoc says: "Run "pydoc <name>" to show documentation on something."
What am I missing?
In the interpreter, just do help(sys)
or
help("sys")
if you didn't already import the module.
What you tried is what you would do on the command line. I'm not sure it
works on windows, though, but
python -m pydoc sys
Should work on both windows and unix.
Peter
Thanks for replying Peter, but none of your suggestions are working.
S:\projects\C2PC\src>python -m
Unknown option: -m
usage: python [option] ... [-c cmd | file | -] [arg] ...
I should also be able to run 'pydoc -g' to start a webserver.
I guess I will have to write the author of pydoc for an answer.
Chris ne********@cox.net wrote: Thanks for replying Peter, but none of your suggestions are working.
S:\projects\C2PC\src>python -m Unknown option: -m usage: python [option] ... [-c cmd | file | -] [arg] ...
The -m option was added in Python 2.4, you must have an older version (though your OP
shows 2.4.2...). Try
python c:\python23\Lib\pydoc.py sys
or whatever the correct path is to python on your system. I should also be able to run 'pydoc -g' to start a webserver.
python c:\python23\Lib\pydoc.py -g
or Start / Programs / Python 2.x / Module docs
Kent
I guess I will have to write the author of pydoc for an answer.
Chris
On Fri, 16 Dec 2005 07:23:57 -0800, newsposter wrote: import pydoc import sys sys.version '2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)]' pydoc sys SyntaxError: invalid syntax
The documentation for pydoc says: "Run "pydoc <name>" to show documentation on something."
What am I missing?
Thanks! Chris
On a GNU/Linux distribution you can run in a shell the command 'pydoc -g'.
This start a little interface that start a little webserver, so it open an
webbrowser and go to a page where you easy find info about modules etc... ne********@cox.net wrote: Thanks for replying Peter, but none of your suggestions are working.
S:\projects\C2PC\src>python -m Unknown option: -m usage: python [option] ... [-c cmd | file | -] [arg] ...
I should also be able to run 'pydoc -g' to start a webserver.
Do you have multiple versions of Python on your computer?
The -m option only works with python2.4, so it seems Windows invoked a wrong
(older) Python version.
For older versions you can do
python c:\path\to\pydoc.py -g
Alternatively you can make sure you pick the right interpreter explicitly:
c:\path\to\python2.4\python.exe -m pydoc -g
I guess I will have to write the author of pydoc for an answer.
If none of the above works, be patient. Someone with a fresher Python on
Windows experience will eventually speak up :-)
Peter ne********@cox.net wrote: Thanks for replying Peter, but none of your suggestions are working.
S:\projects\C2PC\src>python -m Unknown option: -m usage: python [option] ... [-c cmd | file | -] [arg] ...
I should also be able to run 'pydoc -g' to start a webserver.
I guess I will have to write the author of pydoc for an answer.
if you look in the Python menu in the program menu, you'll find a
"module docs" entry that starts pydoc for you.
</F>
If it's just about displaying pydoc pages... SPE Python IDE has pydoc
built in. Just open any file and click on the pydoc tab, next to the
uml tab. Then you see the python documentation of that script, which is
generated on the fly, If you want to see documentation about the sys
module, just click in the upper right corner on the index link.
This works on Windows, Linux and Mac without a pain.
Stani
-- http://pythonide.stani.be
Thanks Peter. I do have two versions, with the older one existing for
compatibility with another application. Option -m works with 2.42. I
neglected to check this when I ran from the command-line.
Thanks,
Chris
Thanks! Yes, it brings up a documentation server, and serves up some
nicely formatted documentation. Learning learning...
-Chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Greg Kuperberg |
last post by:
I plan to use pydoc for my Python project. After looking through the
standard documentation, I am not sure how pydoc interprets its input.
In its basic operation it evidently looks at the first...
|
by: Tony C |
last post by:
According to the help for pydoc, it can be run as a script, from the
command line.
"Or, at the shell command line outside of Python:
Run "pydoc <name>" to show documentation on something"
...
|
by: M.E.Farmer |
last post by:
Hello again!,
I just wanted to start off saying I love this newsgroup!
Everytime I have an idea someone seems to post on it, or about it.
The word for today is **Synchronicity** !
The reason for...
|
by: Brian van den Broek |
last post by:
Hi all,
I'm posting partly so my problem and solution might be more easily
found by google, and partly out of mere curiosity.
I've just spent a frustrating bit of time figuring out why pydoc...
|
by: timw.google |
last post by:
Hi all,
I'm discovering pydoc, and it seems to me that this is a great way to
have online documentation for my application. Are there any examples of
using this in some kind of help menu in an...
|
by: Rob Cowie |
last post by:
I have searched this group and the wider net to find an answer to this,
but I haven't been successful.
Pydoc seems to be capable of writing documentation for all modules
within a package by...
|
by: Wijaya Edward |
last post by:
I tried to call pydoc from my Linux box.
To my realization that it doesn't contain
pydoc.
I thought this module should be a default module.
Can anybody suggest where can I find the module?
I...
|
by: Ron Adam |
last post by:
This is for a new version of pydoc if I can get the class attributes sorted
out. The module level attributes aren't too difficult to categorize.
(I might be just too tired to see the obvious.)
...
|
by: w.m.gardella.sambeth |
last post by:
Hello Pythonists:
I am using SPE as python IDE on Windows, with Python 2.5.1 installed
(official distro). As my mother tongue is Spanish, I had documented
some modules in it (I now, I should have...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |