Commit 0e9c3ace194d618d671272f785940a47cd0e9567
1 parent
274fff72
Exists in
master
and in
68 other branches
ENH: Add suport multiprocess from Windows executable
Showing
1 changed file
with
7 additions
and
1 deletions
Show diff stats
invesalius/invesalius.py
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | # PARTICULAR. Consulte a Licenca Publica Geral GNU para obter mais |
18 | 18 | # detalhes. |
19 | 19 | #-------------------------------------------------------------------------- |
20 | - | |
20 | +import multiprocessing | |
21 | 21 | from optparse import OptionParser |
22 | 22 | import os |
23 | 23 | import sys |
... | ... | @@ -106,8 +106,14 @@ def main(): |
106 | 106 | application.MainLoop() |
107 | 107 | |
108 | 108 | if __name__ == '__main__': |
109 | + | |
110 | + #Necessary in case run from executable | |
111 | + if (sys.platform == "win32"): | |
112 | + multiprocessing.freeze_support() | |
113 | + | |
109 | 114 | # Add current directory to PYTHONPATH |
110 | 115 | sys.path.append(".") |
116 | + | |
111 | 117 | # Init application |
112 | 118 | main() |
113 | 119 | ... | ... |