Python Module

0
8K

If you quit from the Python interpreter and enter it again, the definitions you have made (functions and variables) are lost. Therefore, if you want to write a somewhat longer program, you are better off using a text editor to prepare the input for the interpreter and running it with that file as input instead. This is known as creating a script. As your program gets longer, you may want to split it into several files for easier maintenance. You may also want to use a handy function that you’ve written in several programs without copying its definition into each program.

To support this, Python has a way to put definitions in a file and use them in a script or in an interactive instance of the interpreter. Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the collection of variables that you have access to in a script executed at the top level and in calculator mode).

Cerca
Categorie
Leggi tutto
Programming
Python setup.py
setup.py is a python file, the presence of which is an indication that the module/package...
By Jesse Thomas 2023-04-26 21:12:26 0 7K
Programming
Proxy Webserver in Python
Socket programming in python is very user friendly as compared to c. The programmer need not...
By Jesse Thomas 2023-03-13 22:09:22 0 8K
Financial Services
Market equilibrium
Key points Supply and demand curves intersect at the equilibrium price. This is the...
By Mark Lorenzo 2023-02-10 14:23:05 0 10K
Wrestling
The Thrill and Tradition of Sports Wrestling
Sports wrestling, a centuries-old discipline, continues to captivate athletes and audiences alike...
By Dacey Rankins 2024-07-15 16:41:11 0 13K
Science Fiction and Fantasy
Jurassic Park Anthology. (1993-2019) all movies
Jurassic Park (1993) The head of the company "In-Gen", Professor John Hammond, finds a way to...
By Leonard Pokrovski 2023-02-18 16:59:43 0 20K
image/svg+xml


BigMoney.VIP Powered by Hosting Pokrov