comparison sqlpython.py @ 151:802d8df993da

midway through making plots saveable
author catherine@dellzilla
date Fri, 26 Sep 2008 16:11:29 -0400
parents b00a020b81c6
children
comparison
equal deleted inserted replaced
150:b00a020b81c6 151:802d8df993da
1 # 1 #
2 # SqlPython V1.4.9 2 # SqlPython V1.5.0
3 # Author: Luca.Canali@cern.ch, Apr 2006 3 # Author: Luca.Canali@cern.ch, Apr 2006
4 # Rev 29-May-08 4 # Rev 29-May-08
5 # 5 #
6 # A python module to reproduce Oracle's command line 'sqlplus-like' within python 6 # A python module to reproduce Oracle's command line 'sqlplus-like' within python
7 # Intended to allow easy customizations and extentions 7 # Intended to allow easy customizations and extentions
8 # Best used with the companion modules sqlpyPlus and mysqlpy 8 # Best used with the companion modules sqlpyPlus and mysqlpy
9 # See also http://twiki.cern.ch/twiki/bin/view/PSSGroup/SqlPython 9 # See also http://twiki.cern.ch/twiki/bin/view/PSSGroup/SqlPython
10 10
11 import cmd2,getpass,binascii,cx_Oracle,re,os 11 import cmd2,getpass,binascii,cx_Oracle,re,os
12 import pexpecter, sqlpyPlus 12 import pexpecter, sqlpyPlus
13 __version__ = '1.4.9' 13 __version__ = '1.5.0'
14 # complication! separate sessions -> 14 # complication! separate sessions ->
15 # separate transactions !!!!! 15 # separate transactions !!!!!
16 # also: timeouts, other session failures 16 # also: timeouts, other session failures
17 17
18 class sqlpython(cmd2.Cmd): 18 class sqlpython(cmd2.Cmd):
104 \\h HTML table 104 \\h HTML table
105 \\i INSERT statements 105 \\i INSERT statements
106 \\s CSV (with headings) 106 \\s CSV (with headings)
107 \\S CSV (no headings) 107 \\S CSV (no headings)
108 \\t transposed 108 \\t transposed
109 \\x XML""" 109 \\x XML
110 \\p plot, with markers
111 \\P plot, continuous lines"""
110 print self.do_terminators.__doc__ 112 print self.do_terminators.__doc__
111 113
112 terminatorSearchString = '|'.join('\\' + d.split()[0] for d in do_terminators.__doc__.splitlines()) 114 terminatorSearchString = '|'.join('\\' + d.split()[0] for d in do_terminators.__doc__.splitlines())
113 115
114 def do_yasql(self, arg): 116 def do_yasql(self, arg):