comparison sqlpython.py @ 2:59903dcaf327

working on history
author devlinjs@FA7CZA6N1254998.wrightpatterson.afmc.ds.af.mil
date Mon, 03 Dec 2007 14:29:16 -0500
parents 8fa146b9a2d7
children cd23cd62de3c
comparison
equal deleted inserted replaced
1:8fa146b9a2d7 2:59903dcaf327
98 '''Sends a command to a Senora session (http://senora.sourceforge.net/)''' 98 '''Sends a command to a Senora session (http://senora.sourceforge.net/)'''
99 self.designated_session(arg, pexpecter.SenoraSession) 99 self.designated_session(arg, pexpecter.SenoraSession)
100 do_sen = do_senora 100 do_sen = do_senora
101 101
102 def default(self, arg, do_everywhere = False): 102 def default(self, arg, do_everywhere = False):
103 self.query = Statement(arg).query 103 self.query = finishStatement(arg)
104 try: 104 try:
105 self.curs.execute(self.query) 105 self.curs.execute(self.query)
106 print '\nExecuted\n' 106 print '\nExecuted\n'
107 if do_everywhere: 107 if do_everywhere:
108 self.fail(arg, do_everywhere = True ) 108 self.fail(arg, do_everywhere = True )
118 118
119 # shortcuts 119 # shortcuts
120 do_q = do_quit 120 do_q = do_quit
121 do_exit = do_quit 121 do_exit = do_quit
122 122
123 stmtEndSearchString = r'(.*)(%s)\s*(\d+)?\s*$' % terminatorSearchString 123 stmtEndSearchString = r'(.*)(%s)\s*(\d+)?\s*$' % sqlpython.terminatorSearchString
124 stmtEndFinder = re.compile(stmtEndSearchString, re.MULTILINE | re.DOTALL) 124 stmtEndFinder = re.compile(stmtEndSearchString, re.MULTILINE | re.DOTALL)
125 prompt2 = ' > ' 125 prompt2 = ' > '
126 126
127 def finishStatement(firstline): 127 def finishStatement(firstline):
128 lines = [firstline] 128 lines = [firstline]