diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-03 18:47:19 -0800 |
---|---|---|
committer | Jon Dufresne <jon.dufresne@gmail.com> | 2017-12-10 10:51:07 -0800 |
commit | 9de46e416e5ac1be1c5ff170d1c1ada5b8d7278f (patch) | |
tree | 62291426bc36f26ed5ac65d597ed15a5654a4e22 /examples/simple.py | |
parent | ef64493b8913e4069c4422ad14da6de405c445f6 (diff) | |
download | psycopg2-9de46e416e5ac1be1c5ff170d1c1ada5b8d7278f.tar.gz |
Use print() function instead of print statement throughout project
Forward compatible with newer Pythons.
Diffstat (limited to 'examples/simple.py')
-rw-r--r-- | examples/simple.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/simple.py b/examples/simple.py index 339419e..08191ea 100644 --- a/examples/simple.py +++ b/examples/simple.py @@ -30,17 +30,17 @@ import psycopg2 if len(sys.argv) > 1: DSN = sys.argv[1] -print "Opening connection using dsn:", DSN +print("Opening connection using dsn:", DSN) conn = psycopg2.connect(DSN) -print "Encoding for this connection is", conn.encoding +print("Encoding for this connection is", conn.encoding) curs = conn.cursor() curs.execute("SELECT 1 AS foo") -print curs.fetchone() +print(curs.fetchone()) curs.execute("SELECT 1 AS foo") -print curs.fetchmany() +print(curs.fetchmany()) curs.execute("SELECT 1 AS foo") -print curs.fetchall() +print(curs.fetchall()) conn.rollback() |