import threading Databases = local_import('Databases') try: Databases.getDatabases(locals(), threading.currentThread().name, session) except: pass #print threading.currentThread().name,"SESSION", session