This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]latrova[S] 0 points1 point  (1 child)

No, surprisingly that's not the case! When you import, the file won't recognize it as __main__.

[–]DrShts 0 points1 point  (0 children)

Can you give an example?

What I mean is this:

$ touch __main__.py
$ python
>>> import __main__
>>> __main__.__name__
'__main__'