# HG changeset patch
# User catherine@Elli.myhome.westell.com
# Date 1213386783 14400
# Node ID 289b0a472b654cdc0a9948a8ddb761b9fab6c279
# Parent 1cd9ec12937284beabb28229cb843d94f6087871
print results in describe
diff -r 1cd9ec129372 -r 289b0a472b65 sqlpyPlus.py
--- a/sqlpyPlus.py Mon Jun 09 23:13:50 2008 -0400
+++ b/sqlpyPlus.py Fri Jun 13 15:53:03 2008 -0400
@@ -415,7 +415,26 @@
(self.tblname, self.output_row_as_xml(row), self.tblname)
for row in self.rows]
return '\n'.join(result)
-
+
+ html_template = """
+
+ Table Name
+
+
+
+
+
+ Column Name
+ |
+
+
+
+ Value
+ |
+
+
+
+"""
def output_as_html_table(self):
result = ''.join('%s | ' % c for c in self.colnames)
result = [' \n %s\n
' % result]
@@ -428,7 +447,13 @@
%s
''' % (self.tblname, '\n'.join(result))
return result
-
+
+ #TODO: use serious templating to make these user-tweakable
+
+ def output_as_markup(self, genshi_template):
+ return None
+ #self.tblname, self.colnames, self.rows
+
def output_as_list(self, align):
result = []
colnamelen = max(len(colname) for colname in self.colnames) + 1
@@ -590,7 +615,7 @@
self.curs.execute(descQueries['PackageObjects'][0], {'package_name':object_name, 'owner':owner})
packageContents = self.curs.fetchall()
for (packageObj_name,) in packageContents:
- print packageObj_name
+ self.stdout.write(packageObj_name + '\n')
self.do_select(descQueries['PackageObjArgs'][0],bindVarsIn={'package_name':object_name, 'owner':owner, 'object_name':packageObj_name})
do_desc = do_describe