pythonpydoc

Pydoc in windows


I am learning python from "Learning python the hard way". To use pydoc, I have been asked to type the following in the terminal:

python -m pydoc xxx

I want to know what the -m signifies here. I googled quite a bit but couldn't find any answer.


Solution

  • It basically looks at sys.path and load the module (given as argument) and execute its contents as the __main__ module. Refer to man page for details.