Mega Code Archive

 
Categories / Python / Language Basics
 

Import a pre-defined module

#//File: module1.py def printer(x):           # module attribute     print x #///////////////////////////////////////////////////////////////////////////// #//Main.py import module1                    # get module as a whole module1.printer('Hello world!')   # qualify to get names