Any Python program can be imported as a module.
# C:\python\hello.py
print "Hello, world!"
# C:\testModule.py
import sys
sys.path.append('c:/python')
import hello
modules are extensions that can be imported into Python to extend its capabilities.
You import modules with a special command called import.
import math
print math.floor(32.9)
print int(math.floor(32.9))
|