I\'m trying to get the name of the Python script that is currently running.
I have a script called foo.py and I\'d like to do something like this in ord
foo.py
You can do this without importing os or other libs.
If you want to get the path of current python script, use: __file__
__file__
If you want to get only the filename without .py extension, use this:
__file__.rsplit("/", 1)[1].split('.')[0]