Python error--python TypeError: ' Module ' object is not callable cause analysis

Source: Internet
Author: User
Tags pprint

Cause Analysis:
There are two ways to import a module in Python:

Import module and from module import

The difference is that all imported things are used with the qualification of the module name, while the latter does not require

Cases:

>>>import Pprint

>>>pprint.pprint (People)

OR

>>>from Pprint Import *

>>>pprint (People)

The correct code:
>>> Import Person
>>> person = Person.person (' Dnawo ', ' Mans ')
>>> Print person. Name
Or
>>> from person Import *
>>> person = person (' Dnawo ', ' Mans ')
>>> Print person. Name

You can't do this, Python's own IDE terminal does not support hidden echo. Use the system's terminal, such as the word cmd under Windows OK.

Python error--python TypeError: ' Module ' object is not callable cause analysis

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: info-contact@alibabacloud.com 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.