python get module name

Solutions on MaxInterview for python get module name by the best coders in the world

showing results for - "python get module name"
Josué
03 Oct 2019
1import sys
2print(sys.modules[__name__])
Pamela
07 Jan 2018
1def main():
2    print('Running test...')
3    ...
4
5if __name__ == '__main__':
6    main()