# Thierry Parmentelat <thierry.parmentelat@inria.fr>
# Copyright (C) 2010 INRIA
#
+
+from __future__ import print_function
+
import sys
import time
import subprocess
def myprint(message, id='client'):
now = time.strftime("%H:%M:%S", time.localtime())
- print "* {now} ({id}) -- {message}".format(**locals())
+ print("* {now} ({id}) -- {message}".format(**locals()))
sys.stdout.flush()
def show_network_status(id):
else:
server.serve_forever()
except KeyboardInterrupt as e:
- print 'Bailing out on keyboard interrupt'
+ print('Bailing out on keyboard interrupt')
sys.exit(1)
class Ready:
s.bind((options.address, options.port))
return True
except Exception as e:
- print e
+ print(e)
return False
def eth0_has_ipv4():
elif arg.find("ready") >= 0:
sys.argv.remove(arg)
Ready().main()
- print 'you must specify either --client or --server'
+ print('you must specify either --client or --server')
sys.exit(1)