# this sample program shows the use of modules # # in order for this to work you will have to have # the two modules (Python source files) my_utils.py # and my_math.py in the same folder as this program # # written by e.bonakdarian nov 2009 # # our two acceptable ways of using/importing modules import my_math from my_utils import bike_banner, simple_banner def main(): # just showing some examples of how to # call methods 'living' in other modules bike_banner() number = 3 print('The number %3d is' %number), if my_math.isEven(number): print 'even.' else: print 'odd.' number = 20 print('The number %3d is' %number), if my_math.isEven(number): print 'even.' else: print 'odd.' simple_banner() main() raw_input('\n to exit')