try: import cProfile as myprofiler except: import profile as myprofiler import cthulhu.cthulhu myprofiler.run('cthulhu.cthulhu.main()', 'cthulhuprof')