diff --git a/examples/notes/issue_219.py b/examples/notes/issue_219.py index 48b94f4a..4b612160 100644 --- a/examples/notes/issue_219.py +++ b/examples/notes/issue_219.py @@ -11,21 +11,20 @@ # -import sys -sys.path.insert(0, '../src') -import petl; print petl.VERSION -from petl.fluent import etl -import psycopg2 import MySQLdb +import psycopg2 -# +import petl +from petl.fluent import etl +# +print(petl.VERSION) tbl_dummy_data = etl().dummytable(100000) tbl_dummy_data.look() # -print tbl_dummy_data.nrows() +print(tbl_dummy_data.nrows()) # @@ -48,12 +47,12 @@ # # memory usage using default cursor -print etl.fromdb(psql_connection, 'select * from issue_219 order by foo').look(2) +print(etl.fromdb(psql_connection, 'select * from issue_219 order by foo').look(2)) # # memory usage using server-side cursor -print etl.fromdb(lambda: psql_connection.cursor(name='server-side'), 'select * from issue_219 order by foo').look(2) +print(etl.fromdb(lambda: psql_connection.cursor(name='server-side'), 'select * from issue_219 order by foo').look(2)) # @@ -77,10 +76,10 @@ # # memory usage with default cursor -print etl.fromdb(mysql_connection, 'select * from issue_219 order by foo').look(2) +print(etl.fromdb(mysql_connection, 'select * from issue_219 order by foo').look(2)) # # memory usage with server-side cursor -print etl.fromdb(lambda: mysql_connection.cursor(MySQLdb.cursors.SSCursor), 'select * from issue_219 order by foo').look(2) +print(etl.fromdb(lambda: mysql_connection.cursor(MySQLdb.cursors.SSCursor), 'select * from issue_219 order by foo').look(2))