1

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.

1

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.