Skip to content

Commit

Permalink
redirect stdout for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bullpup committed Jan 13, 2011
1 parent 7e94010 commit 851a544
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ektaprogui.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import time
import tkMessageBox
import tkSimpleDialog
import os



Expand Down Expand Up @@ -1279,12 +1280,22 @@ def apply(self):
tkMessageBox.showinfo("Command Result", \
"Interpreted Command: " + message)


class NullDevice():
def write(self, s):
pass



if __name__ == '__main__':
if __name__ == '__main__':

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.setLevel(logging.CRITICAL)

if os.name == "nt":
import sys
sys.stderr = NullDevice()
sys.stdout = NullDevice()

mainWindow = EktaproGUI()
mainWindow.mainloop()

0 comments on commit 851a544

Please sign in to comment.