Show More
@@ -8,7 +8,6 b'' | |||||
8 | # GNU General Public License version 2 or any later version. |
|
8 | # GNU General Public License version 2 or any later version. | |
9 |
|
9 | |||
10 |
|
10 | |||
11 | import _imp |
|
|||
12 | import os |
|
11 | import os | |
13 | import sys |
|
12 | import sys | |
14 | import typing |
|
13 | import typing | |
@@ -32,7 +31,12 b' def mainfrozen():' | |||||
32 | return ( |
|
31 | return ( | |
33 | hasattr(sys, "frozen") # new py2exe |
|
32 | hasattr(sys, "frozen") # new py2exe | |
34 | or hasattr(sys, "importers") # old py2exe |
|
33 | or hasattr(sys, "importers") # old py2exe | |
35 | or _imp.is_frozen("__main__") # tools/freeze |
|
34 | or getattr( | |
|
35 | getattr(sys.modules.get('__main__'), '__spec__', None), | |||
|
36 | 'origin', | |||
|
37 | None, | |||
|
38 | ) | |||
|
39 | == 'frozen' # tools/freeze | |||
36 | ) |
|
40 | ) | |
37 |
|
41 | |||
38 |
|
42 |
General Comments 0
You need to be logged in to leave comments.
Login now