python -c "help('while')"
Dave Benjamin
ramen at lackingtalent.com
Thu Apr 24 04:55:03 EDT 2003
In article <878yu0h60i.fsf at jidanni.org>, 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
help(sys.argv[1])
^D
$ chmod +x pyhelp
$ ./pyhelp while
7.2 The while statement...
Dave
More information about the Python-list
mailing list