interactive help on string functions - howto

Jeff Shannon jeff at ccvcorp.com
Wed Sep 29 15:27:45 EDT 2004


George Yoshida wrote:

> Helmut Jarausch wrote:
>
>> entering
>> help('rstrip')
>> or
>> help('ljust')
>>
>> into IDLE's shell window I only get
>> no Python documentation found ...
>>
>> Am I missing something?
>
>
> You need to remove quotes from arguments, i.e.,
> >>> help(rstrip)    # help('rstrip') is a no-no


But note that help(rstrip) doesn't provide any useful help either:

 >>> help(rstrip)
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
NameError: name 'rstrip' is not defined
 >>>

What's needed is help(str.rstrip), which does indeed work.  (As already 
pointed out by other posters.)

Jeff Shannon
Technician/Programmer
Credit International




More information about the Python-list mailing list