source: src/mlx/mlx.py@ 36:f79362793664

Last change on this file since 36:f79362793664 was 36:f79362793664, checked in by István Váradi <ivaradi@…>, 12 years ago

Update seems to work

File size: 972 bytes
Line 
1# The main program
2
3from .gui.gui import GUI
4
5from config import Config
6
7import os
8import sys
9
10#--------------------------------------------------------------------------------------
11
12class StdIOHandler(object):
13 """Handler for the standard I/O messages."""
14 def __init__(self, gui):
15 """Construct the handler."""
16 self._gui = gui
17
18 def write(self, text):
19 """Write the given text into the log."""
20 self._gui.writeStdIO(text)
21
22#--------------------------------------------------------------------------------------
23
24def main():
25 """The main operation of the program."""
26 programDirectory = os.path.dirname(sys.argv[0])
27
28 config = Config()
29 gui = GUI(programDirectory, config)
30
31 sys.stdout = StdIOHandler(gui)
32 sys.stderr = StdIOHandler(gui)
33
34 gui.build(programDirectory)
35
36 gui.run()
37
38#--------------------------------------------------------------------------------------
39
40if __name__ == "__main__":
41 main()
Note: See TracBrowser for help on using the repository browser.