Commit 45889f5abfd6286d6768cc87ded87b40af604e44

Authored by Paulo Henrique Junqueira Amorim
1 parent c04ba1d7

ENH: Removed wxPython window error from executable

Showing 1 changed file with 8 additions and 2 deletions   Show diff stats
invesalius/invesalius.py
@@ -108,9 +108,15 @@ def main(): @@ -108,9 +108,15 @@ def main():
108 if __name__ == '__main__': 108 if __name__ == '__main__':
109 109
110 #Necessary in case run from executable 110 #Necessary in case run from executable
111 - if (sys.platform == "win32"): 111 + if hasattr(sys,"frozen") and sys.frozen == "windows_exe":
112 multiprocessing.freeze_support() 112 multiprocessing.freeze_support()
113 - 113 +
  114 + #Remove wxPython log
  115 + #sys.stdout = open("stdout.log" ,"w")
  116 + sys.stderr = open("stderr.log", "w")
  117 +
  118 + print "Executavel...."
  119 +
114 # Add current directory to PYTHONPATH 120 # Add current directory to PYTHONPATH
115 sys.path.append(".") 121 sys.path.append(".")
116 122