A Simple Module Containing a Function # c:\python\hello2.py def hello(): print "Hello, world!" You can then import it like this: sys.path.append('c:/python') import hello2 hello2.hello()