I am wondering if there is a CLI like ‘man.py’ dedicated to Python?
ex,
man.py os.system
> system(command) -> exit_status
>
> Execute the command (a string) in a subshell.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way is using
pydoc functionon the shell, withfunctionbeing either the name of a builtin or the qualified name (module.function) of a function in a module:(
PAGER=catwas only used to make it copy&pastable here)When using IPython you can use
function?to view the docstring offunctionorfunction??for a more verbose view that includes the full sourcecode for functions written in python.In the normal python shell you can use
help(function)for this. However, in my opinion the IPython way is more comfortable.