import os

def main():
    path_lib = os.path.abspath(os.path.split(os.path.abspath(sys.modules[
        '__main__'].__file__))[0] + '/../lib')
sys.path += glob.glob(path_lib + '/*.egg')
from common import stuff
stuff.doCommonStuff()
How can I use common code in python?