python -c "help('while')"

Dave Benjamin ramen at
Thu Apr 24 10:55:03 CEST 2003

In article <878yu0h60i.fsf at>, Dan Jacobson wrote:
> Is this the easiest way to get help on things like "while" in one
> shell command, outside the interpreter: 
> $ python -c "help('while')"

Well, maybe someone has a better answer, but you could always make yourself
a little helper script (or use aliases in your shell, even):

$ cat > pyhelp
#!/usr/bin/env python
import sys
$ chmod +x pyhelp
$ ./pyhelp while

   7.2 The while statement...

More information about the Python-list mailing list