cmd command to view help documents such as Python module functions and introduction

Source: Internet
Author: User
Tags wrapper

dir function to view the properties of an object

The use of the method is simple, for example, the OS type, in the Python command Window input dir (' OS ') to view the properties of the OS module

Open cmd Command Window


Enter Python (note: The computer needs a Python environment and the Python environment variable is configured)


Enter the dir (' os ') command


How do I see the help document for a property of an object?

To view the ' OS ' Split property, you can use __doc__, using the method print (' OS '. split.__doc__)

Print (' OS '. split.__doc__)


You can also use the Help function to view a property of an object, using the.

Help (' OS '. Split)


Help (' OS '. Strip)


View detailed documentation for an object with Help

You can use Help (' OS ') for detailed documentation of the STR type. If the document has a lot of content, help lists all parts of the document and prompts "-more--" in the lower-left corner, press ENTER to display more information, and to return to command-line interaction mode, press CTRL + C.

Help (' OS ')


cmd command to view help documents such as Python module functions and introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.