Tools, FAQ, Tutorials:
What Is Module Package
What Is Module Package in Python?
✍: FYIcenter.com
A module package in Python is a collection of Python module files saved
in a file directory with a special file called __init__.py.
A module package can have the following elements:
Module packages can be nested in the same way as file directories can be nested.
For example, we can created a module package called "firstPackage" by creating the following file directory and the __init__.py file:
>\fyicenter> dir
<DIR> firstPackage
>\fyicenter> dir firstPackage
337 secondModule.py
165 __init__.py
>\fyicetner> type firstPackage\__init__.py
# __init__.py
"""My first module package"""
1.00 = "2.0"
print("Loading first package...")
def sayHello():
print("Greetings from first package!")
⇒ 'import' Module Package Loading Statement
2022-08-26, ∼1710🔥, 0💬
Popular Posts:
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How to use 'choose ... when ..." policy statements to control execution flows? If you want to contro...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....