#some.py
print(__name__)
On REPL, importing the above python code outputs filename.
>>> import some
some
While running the same script it outputs __main__
,
E:\> python some.py
__main__
Why isn't the results identical and what is the difference between two approaches?