Commit 0759f72d4fadd2ea870005242dda4817baf8a195

Authored by Paulo Henrique Junqueira Amorim
1 parent c510d733

ENH: Write file with errors if InVesalius running from executable

Showing 1 changed file with 7 additions and 10 deletions   Show diff stats
invesalius/invesalius.py
... ... @@ -192,16 +192,13 @@ if __name__ == '__main__':
192 192 # Needed in win 32 exe
193 193 if hasattr(sys,"frozen") and sys.frozen == "windows_exe":
194 194 multiprocessing.freeze_support()
195   -
196   - # wxPython log
197   - #sys.stdout = open("stdout.log" ,"w")
198   -
199   - folder_log = os.path.join(os.path.expanduser('~'), '.invesalius', 'logs')
200   - if not os.path.isdir(folder_log):
201   - os.makedirs(folder_log)
202   -
203   - path = os.path.join(folder_log, "stderr.log")
204   - sys.stderr = open(path, "w")
  195 +
  196 + folder_log = os.path.join(os.path.expanduser('~'), '.invesalius', 'logs')
  197 +
  198 + if not os.path.isdir(folder_log):
  199 + os.makedirs(folder_log)
  200 + path = os.path.join(folder_log, "stderr.log")
  201 + sys.stderr = open(path, "w")
205 202  
206 203 # Add current directory to PYTHONPATH
207 204 sys.path.append(".")
... ...