Python package for executing functions when packages are imported
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

5 lines
177 B

def get_module_name(module):
"""Helper function to get a module's name"""
if hasattr(module, '__spec__'):
return module.__spec__.name
return module.__name__