New to programming and python altogether. In the book I'm learning from, the author suggested I find out the purpose of Pydoc.
I did a google search on it, and found a match (from Gnome Terminal) but it didn't make much sense to me. Anyone mind simplifying a bit?
You can access the interactive shell in pydoc using it's help function. In order to do this, launch your terminal, and enter the python interactive shell. Now, import pydoc and then use the pydoc. help() command to launch the interactive shell.
Linux & WindowsType install and select the menu item, Package Control: Install Package . Type PyDOC and select the PyDOC package that is displayed. This will install the package in your editor.
Python has a built-in help() function that can access this information and prints the results. For example, to see the documentation of the built-in len function, you can do the following: In [1]: help(len) Help on built-in function len in module builtins: len(...)
Pydoc is a help / documentation module for Python.
Use this on your Windows terminal to understand what a function in python does :
python -m pydoc <function>
eg.
python -m pydoc raw_input
If the documentation for a particular function is very long, use 'q' to get out of it.
e.g. in case of
python -m pydoc Tkinter
It's a tool to generate python-style documentation see http://docs.python.org/2/library/pydoc.html
You may want to take a look at Sphinx too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With