changeset 305:9c727d6afdc0

docs changes
author catherine@dellzilla
date Wed, 25 Mar 2009 14:37:12 -0400
parents 98975ce340ac
children ed02c8b1a9b6
files docs/source/comparison.rst sqlpython/sqlpyPlus.py
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/docs/source/comparison.rst	Wed Mar 25 10:00:46 2009 -0400
+++ b/docs/source/comparison.rst	Wed Mar 25 14:37:12 2009 -0400
@@ -797,10 +797,12 @@
 The -UZ flags, though optional, will update your sqlpython installation, if necessary, and 
 unzip the code so that you can modify it.
 
-To generate graphs using sqlpython's `\\b`, `\\g`, and `\\l` terminators, you will need to install `pylab`::
+To generate graphs using sqlpython's `\\b`, `\\g`, and `\\l` terminators, you will need to install `pylab` (or `matplotlib`)::
 
   $ easy_install pylab
 
+  $ apt-get install python-matplotlib
+  
 Alternately, a Windows installer is available at http://pypi.python.org/pypi/sqlpython, though easy_install
 works on Windows as well.
 
--- a/sqlpython/sqlpyPlus.py	Wed Mar 25 10:00:46 2009 -0400
+++ b/sqlpython/sqlpyPlus.py	Wed Mar 25 14:37:12 2009 -0400
@@ -845,11 +845,11 @@
                     for ddlargs in ddl:
                         try:
                             code = str(self.curs.callfunc('DBMS_METADATA.GET_DDL', cx_Oracle.CLOB, ddlargs))
-                            if opts.lines:
+                            if hasattr(opts, 'lines') and opts.lines:
                                 code = code.splitlines()
                                 template = "%%-%dd:%%s" % len(str(len(code)))
                                 code = '\n'.join(template % (n+1, line) for (n, line) in enumerate(code))
-                            if opts.num is not None:
+                            if hasattr(opts, 'num') and (opts.num is not None):
                                 code = code.splitlines()
                                 code = centeredSlice(code, center=opts.num+1, width=opts.width)
                                 code = '\n'.join(code)