Get full package module name
__name__
always contains the full name of the module. (Other than __main__
on main, of course.)
A simple way of retrieving the full module name within its package:
print(__file__)
Try using the __name__
attribute of the module.