update examples/simple/client.py and server.py to work with Python3
diff --git a/examples/simple/client.py b/examples/simple/client.py
index 0247c67..c051bf4 100644
--- a/examples/simple/client.py
+++ b/examples/simple/client.py
@@ -13,11 +13,11 @@
def verify_cb(conn, cert, errnum, depth, ok):
# This obviously has to be updated
- print 'Got certificate: %s' % cert.get_subject()
+ print('Got certificate: %s' % cert.get_subject())
return ok
if len(sys.argv) < 3:
- print 'Usage: python[2] client.py HOST PORT'
+ print('Usage: python[2] client.py HOST PORT')
sys.exit(1)
dir = os.path.dirname(sys.argv[0])
@@ -44,7 +44,7 @@
sys.stdout.write(sock.recv(1024))
sys.stdout.flush()
except SSL.Error:
- print 'Connection died unexpectedly'
+ print('Connection died unexpectedly')
break