~kenneth-arnold/luminoso/divisi2-port

« back to all changes in this revision

Viewing changes to luminoso/run_luminoso.py

  • Committer: Kenneth Arnold
  • Date: 2010-02-08 22:10:02 UTC
  • Revision ID: kcarnold@tigris-20100208221002-rmo5s2uup6euxfop
Try removing some magic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
STDOUT = sys.stdout
10
10
 
11
11
def initialize():
12
 
    """
13
 
    Spyderlib configuration:
14
 
    
15
 
    ( ) Magic
16
 
    (x) More magic
17
 
    """
18
 
    global QtGui
19
12
    app = QtGui.QApplication(sys.argv)
20
13
 
21
 
    #----Monkey patching PyQt4.QtGui.QApplication
22
 
    class FakeQApplication(QtGui.QApplication):
23
 
        """Spyder's fake QApplication"""
24
 
        def __init__(self, args):
25
 
            self = app
26
 
        @staticmethod
27
 
        def exec_():
28
 
            """Do nothing because the Qt mainloop is already running"""
29
 
            app.exec_()
30
 
    QtGui.QApplication = FakeQApplication
31
 
 
32
14
    #----Monkey patching sys.exit
33
15
    def fake_sys_exit(arg=[]):
34
16
        pass