# HG changeset patch # User catherine@dellzilla # Date 1238006232 14400 # Node ID 9c727d6afdc0f09302a73e1d60cf530f910f39e6 # Parent 98975ce340ac6047881c4956f2aa5be7ab9f60df docs changes diff -r 98975ce340ac -r 9c727d6afdc0 docs/source/comparison.rst --- 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. diff -r 98975ce340ac -r 9c727d6afdc0 sqlpython/sqlpyPlus.py --- 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)