def get_main_module():
    if not hasattr(main_module, '__file__'):
        # if run from interactive shell
        return None, None
    main_filename = os.path.basename(main_module.__file__)
    module_name, ext = os.path.splitext(main_filename)
    return FakeModule(module=main_module, name=module_name)
Returns main module and module name pair.
dataset/ETHPy150Open cenk/kuyruk/kuyruk/importer.py/get_main_module