(Mar-05-2018, 06:28 AM)sylas Wrote: I renamed my main.py to __main__.py, as you can see on the above error message.
I can't see that on the error message because the error message says that it cannot find
__main__
, not that it finds __main__ and is unhappy with it.
Try the following experiment: create a folder
foo
containing a single file
__main__.py
with the following code
print('hello world')
Then run
Output:
python foo
in a console. It should print hello world. On my box (linux) it works both with python 3 and python 2.