Force writing errors/output to file in case of frozen distributive

This commit is contained in:
DarkPhoenix
2015-05-01 15:08:14 +03:00
parent 2180b1ac3b
commit 68d504c79d
2 changed files with 17 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ if not hasattr(sys, 'frozen'):
except ImportError:
print("Cannot find wxPython\nYou can download wxPython (2.8+) from http://www.wxpython.org/")
sys.exit(1)
# if user wants to force 2.8, try that and go directly to ensureMinimal path if fails
try:
if getattr(config.configforced, "force28", False):
@@ -51,7 +51,7 @@ if not hasattr(sys, 'frozen'):
print "Installed wxPython version doesn't meet requirements.\nYou can download wxPython (2.8+) from http://www.wxpython.org/"
sys.exit(1)
else:
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
print "wxPython 2.8 not found; attempting to use newer version, expect errors"
try:
import sqlalchemy
@@ -87,6 +87,10 @@ if __name__ == "__main__":
config.saveInRoot = True
config.defPaths()
# Basic logging initialization
import logging
logging.basicConfig()
# Import everything
import wx
import os