I used the approach with __file__ os.path.abspath(__file__)
but there is a little trick, it returns the .py file
when the code is run the first time,
next runs give the name of *.pyc file
so I stayed with: inspect.getfile(inspect.currentframe())
or sys._getframe().f_code.co_filename