[Bio] / ModelEditor / ModelEditor Repository:
ViewVC logotype

Diff of /ModelEditor/ModelEditor

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

revision 1.3, Tue Nov 2 17:48:26 2004 UTC revision 1.6, Fri Nov 19 23:22:49 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 47  Line 48 
48    
49          EVT_CLOSE(self, self.mainMenuBar.exitApp)          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")              #b = BssFactory('fl-gentoo-test:5432:KahSCDb:trust:inme', "postgres")
60                #b = BssFactory('140.221.204.254:5432:KahSCDb:trust:inme', "postgres")
61              Catalog.instance().addDataFactory( b)              Catalog.instance().addDataFactory( b)
62          except NotImplementedError:          except NotImplementedError:
63              pass              pass
# Line 64  Line 70 
70          dlg.Destroy()          dlg.Destroy()
71          return          return
72    
73        #------------------------------------------------------------------------
74        def signalHandler(self, signum, frame):
75        #------------------------------------------------------------------------
76            """
77            signal handler for sigint, sigterm, and sigHUP to let us close down cleanly.
78            We need to disconnect from AG.
79            """
80    
81            print "ModelEditor:signalHandler: caught signal=", signum
82    
83            try:
84                theMgr = self.cat.meAGMgr
85                if (not theMgr == None):
86                    theMgr.done()
87            except Exception, e:
88                print e
89    
90            self.mainMenuBar.exitApp(None)
91            return
92    
93    
94  ########################################################################  ########################################################################
95  if __name__ == "__main__":  if __name__ == "__main__":
96      app = MyApp(0)      app = MyApp(0)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3