Mercurial > sqlpython
comparison sqlpython.py @ 55:2fd2f54648ea
fixed multiline bug in default
author | catherine@cordelia |
---|---|
date | Wed, 02 Apr 2008 20:34:50 -0400 |
parents | 33c9bc61db66 |
children | d0bf9e40ba8d |
comparison
equal
deleted
inserted
replaced
54:bea930b41b58 | 55:2fd2f54648ea |
---|---|
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 = finishStatement(arg).strip().rstrip(';') | 103 self.query = self.finishStatement(arg).strip().rstrip(';') |
104 try: | 104 try: |
105 self.curs.execute(self.query) | 105 self.curs.execute(self.query) |
106 print '\nExecuted%s\n' % ((self.curs.rowcount > 0) and ' (%d rows)' % self.curs.rowcount or '') | 106 print '\nExecuted%s\n' % ((self.curs.rowcount > 0) and ' (%d rows)' % self.curs.rowcount or '') |
107 if do_everywhere: | 107 if do_everywhere: |
108 self.fail(arg, do_everywhere = True ) | 108 self.fail(arg, do_everywhere = True ) |