My environment is Windows 10, python 3.5 and cx_Freeze 5.0.
if __name__ == "__main__": ...
doesn't works in a freezed executable.
I have to change it to:
if __name__.endswith('__main__'): ...
That is, because the name of the executable is added internally at freezing.
Is that intended? How can we avoid the problem that above code doesn't works?