Python documentation equivalent for Perl's "perldoc"
Question: ## Quick [perldoc](http://search.cpan.org/~dapm/perl-5.14.4/pod/perldoc.pod)
overview:

When writing a Perl module you can document it with
[`POD`](http://perldoc.perl.org/perlpod.html) style documentation. Then to get
an overview of how the module works you can just type this into the command
line:

`perldoc <module_name>`

* * *

## How do I do this with Python?

I understand that Python has a standard form of documenting code using
"docstrings" that is somewhat similar to Perl's POD style. The information
about the Python module can then be extracted using the `help()` function, but
this is _far from elegant_.

First you need to start the Python interpreter, then import the module you
want to get help for, and then finally you can use the `help()` function to
get information about the module.

**example:**

    
    
    >python
    # Prints Python version info
    >>>import <module_name>
    >>>help(<module_name>)
    # Prints documentation!
    

* * *

## Is there a better way?

I would like a Python equivalent to the way this works for Perl:

`pydoc <module_name>`

but when I try this I get the following output:

    
    
    'pydoc' is not recognized as an internal or external command,
    operable program or batch file.
    


Answer: ## It turns out that `pydoc` actually does work just like `perldoc`!

With a catch ... you just need to type it a little different!

`python -m pydoc <module_name>`

* * *

## And with a little "haquery"... :)

Create a pydoc.bat file as shown below.

pydoc.bat:

    
    
    python -m pydoc %1
    

Then store this file in "C:\Python27" (or in the same location as your
python.exe file)

> Then swiftly wave your hands over the keyboard and exclaim "**_SIM SALA
> BIM!_** "

your `pydoc` command will now work!

`pydoc <module_name>`

