473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

python doc in command line

Hi,

Perl has a command line help perldoc. I'm wondering if python has a
similar help command.

Thanks,
Peng
Jul 16 '08 #1
2 1470
Peng Yu wrote:
Perl has a command line help perldoc. I'm wondering if python has a
similar help command.
it's built into the interpreter, and Python tells you how to use it when
you start Python in interactive mode.

$ python
Python 2.5.1
Type "help", "copyright", "credits" or "license" for more information.
>>help
Type help() for interactive help, or help(object) for help about object.
>>help()
Welcome to Python 2.5! This is the online help utility.

If this is your first time using Python, you should definitely check out
the tutorial on the Internet at http://www.python.org/doc/tut/.

Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To quit this help utility and
return to the interpreter, just type "quit".

To get a list of available modules, keywords, or topics, type "modules",
"keywords", or "topics". Each module also comes with a one-line summary
of what it does; to list the modules whose summaries contain a given
word such as "spam", type "modules spam".

helpquit

You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)". Executing "help('string')"
has the same effect as typing a particular string at the helpprompt.
>>help("string")
Help on module string:

NAME
string - A collection of string operations (most are no
longer used).

FILE
string.py

....
>>help(len)
Help on built-in function len in module __builtin__:

len(...)
len(object) -integer

Return the number of items of a sequence or mapping.
>>>
(etc)

</F>

Jul 16 '08 #2
Peng Yu <Pe*******@gmail.comwrites:
Perl has a command line help perldoc. I'm wondering if python has a
similar help command.
The interactive interpreter has a "help" command, and a corresponding
"help" function which can be passed an object to display its
docstrings recursively and nicely-formatted.

The same facility is available with the external 'pydoc' command.

--
\ “The right to search for truth implies also a duty; one must |
`\ not conceal any part of what one has recognized to be true.” |
_o__) —Albert Einstein |
Ben Finney
Jul 16 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Adam | last post by:
Hi I had Ruby 1.6.8-8 for Windows installed on my WinXP Pro machine prior to installing Python 2.3. After installing Python 2.3, I tried to <----- screen output of python interactive command...
52
by: Olivier Scalbert | last post by:
Hello , What is the python way of doing this : perl -pi -e 's/string1/string2/' file ? Thanks Olivier
0
by: Fuzzyman | last post by:
Movable Python has just been released on sourceforge. Movable Python is a frozen distribution of Python. It will run python scripts without needing to be installed. ...
15
by: Ashot | last post by:
This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: ---------------------- I have been frustrated for quite some time with a lack of a...
75
by: Xah Lee | last post by:
http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html --------- QUOTE The module defines several functions, constants, and an exception. Some of the...
1
by: jtan325 | last post by:
hi, i am running Linux Ubuntu Hoary and am trying to build the Python numarray package, v. 1.3.2 by hand since ubuntu's repos won't be updated until breezy. i have python 2.4, and gcc 3.3.5 ...
4
by: tnoell | last post by:
Hi comp.lang.python: New to the group and new to python, so don't tear me up too much ... I installed the GNU readline support in python2.4, and it is working, but there is one annoying behaviour...
18
by: stylecomputers | last post by:
Hi All, What do you find the best IDE for creating web applications in Python is? Preferably FOS IDE. Cheers
0
by: Martijn de Munnik | last post by:
Hi, I'm trying to build/install pysqlite on a Solaris 10 platform. I've got Sun Studio 11 on a AMD 64 platform and got this error. I'm a python newbie and just want to install trac. I've got...
0
by: Cameron Simpson | last post by:
On 17Aug2008 21:25, John Nagle <nagle@animats.comwrote: Because $HOSTNAME is a bash specific variable, set by bash but NOT EXPORTED! Like $0 and a bunch of other "private" variables, subprocesses...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.