[Bio] / ModelEditor / ModelEditor Repository:
ViewVC logotype

Diff of /ModelEditor/ModelEditor

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Fri Oct 22 02:54:03 2004 UTC revision 1.4, Thu Nov 4 02:19:59 2004 UTC
# Line 1  Line 1 
1  #!/usr/bin/env python  #!/usr/bin/env python
2    
3    #import signal
4  from wxPython.wx import *  from wxPython.wx import *
5    
6  from ModelEditor.MainLayout        import MainLayout  from ModelEditor.MainLayout        import MainLayout
# Line 45  Line 46 
46          self.help           = HelpPanel(self)          self.help           = HelpPanel(self)
47          self.meAGMgr        = None       #MeAGMgr instance to manage ag issues          self.meAGMgr        = None       #MeAGMgr instance to manage ag issues
48    
49            EVT_CLOSE(self, self.mainMenuBar.exitApp)
50    
51            #signal.signal(signal.SIGINT, self.signalHandler)
52            #signal.signal(signal.SIGTERM, self.signalHandler)
53            #signal.signal(signal.SIGHUP, self.signalHandler)
54    
55          try:          try:
56              #b = BssFactory('biosimscratch/bss@db02', 'oracle' )              #b = BssFactory('biosimscratch/bss@db02', 'oracle' )
57              #b = BssFactory('pgsql.mcs.anl.gov:5432:kahdb:trust:inme', "postgres")              #b = BssFactory('pgsql.mcs.anl.gov:5432:kahdb:trust:inme', "postgres")
58              b = BssFactory('porta-video:5432:KahSCDb:trust:inme', "postgres")              #b = BssFactory('porta-video:5432:KahSCDb:trust:inme', "postgres")
59                b = BssFactory('fl-gentoo-test:5432:KahSCDb:trust:inme', "postgres")
60              Catalog.instance().addDataFactory( b)              Catalog.instance().addDataFactory( b)
61          except NotImplementedError:          except NotImplementedError:
62              pass              pass
# Line 61  Line 69 
69          dlg.Destroy()          dlg.Destroy()
70          return          return
71    
72        #------------------------------------------------------------------------
73        def signalHandler(self, signum, frame):
74        #------------------------------------------------------------------------
75            """
76            signal handler for sigint, sigterm, and sigHUP to let us close down cleanly.
77            We need to disconnect from AG.
78            """
79    
80            print "ModelEditor:signalHandler: caught signal=", signum
81    
82            try:
83                theMgr = self.cat.meAGMgr
84                if (not theMgr == None):
85                    theMgr.done()
86            except Exception, e:
87                print e
88    
89            self.mainMenuBar.exitApp(None)
90            return
91    
92    
93  ########################################################################  ########################################################################
94  if __name__ == "__main__":  if __name__ == "__main__":
95      app = MyApp(0)      app = MyApp(0)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3