Skip to content

Commit

Permalink
Redirect stdout and stderr to files when frozen by py2app
Browse files Browse the repository at this point in the history
  • Loading branch information
tlecomte committed Jan 17, 2016
1 parent 92803f3 commit 79809a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions friture/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ def main():
print("Adding the following to the Library paths: " + pluginsPath)
QApplication.addLibraryPath(pluginsPath)

if (hasattr(sys, "frozen"): #py2app
sys.stdout = open(os.path.expanduser("~/friture.out.txt"), "w")
sys.stderr = open(os.path.expanduser("~/friture.err.txt"), "w")

# Splash screen
pixmap = QPixmap(":/images/splash.png")
splash = QSplashScreen(pixmap)
Expand Down

0 comments on commit 79809a1

Please sign in to comment.