Using Scripts and Modules

Because Python's interactive mode doesn't save any of your work when you quit, you'll want to store your important work in text files. Text files that contain Python code are called scripts (if they are whole programs) or modules (if they contain chunks of code meant to be imported into other programs).

Both scripts and modules end with the suffix .py.

TECHNICAL Actually, the distinction between scripts and modules is fuzzier than STUFF that because some modules include code that lets them stand on their own or that gives information about their status... and some programs can be imported as modules.

Was this article helpful?

0 0

Post a comment