-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathbuilderMain.py
More file actions
executable file
·27 lines (24 loc) · 828 Bytes
/
builderMain.py
File metadata and controls
executable file
·27 lines (24 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
import builder.builderWindow
import sys
def Main():
try:
sys.stderr.write("\n")
sys.stderr.flush()
except IOError:
class dummyStream:
''' dummyStream behaves like a stream but does nothing. '''
def __init__(self): pass
def write(self,data): pass
def read(self,data): pass
def flush(self): pass
def close(self): pass
# and now redirect all default streams to this dummyStream:
sys.stdout = dummyStream()
sys.stderr = open("errors.txt", "w", 0)
sys.stdin = dummyStream()
sys.__stdout__ = dummyStream()
sys.__stderr__ = dummyStream()
sys.__stdin__ = dummyStream()
builder.builderWindow.MainFrame()
if __name__=='__main__': Main()