Index: /trunk/examples/JobParser.py
===================================================================
--- /trunk/examples/JobParser.py	(revision 355)
+++ /trunk/examples/JobParser.py	(revision 356)
@@ -251,5 +251,5 @@
         jp.read(sys.argv[1])
     except IndexError:
-        print("Usage: %s <jobscript>" %(sys.argv[0]))
+        print(("Usage: %s <jobscript>" %(sys.argv[0])))
         sys.exit(1)
         
@@ -261,5 +261,5 @@
     e, e_txt = pbs.error()
     if e:
-        print(e, e_txt)
+        print((e, e_txt))
     else:
         print(job_id)
Index: /trunk/examples/ha_server.py
===================================================================
--- /trunk/examples/ha_server.py	(revision 355)
+++ /trunk/examples/ha_server.py	(revision 356)
@@ -17,21 +17,21 @@
 	pbs_server = pbs.pbs_default() 
 	if not pbs_server:
-		print "No default pbs server"
+		print("No default pbs server")
 		sys.exit(1)
 
 	con = pbs.pbs_connect(pbs_server)
 	if con == -1:
-		print "Default pbs server connection failed"
+		print("Default pbs server connection failed")
 		pbs_server = pbs.pbs_fbserver()
 		if not pbs_server:
-			print "No pbs fallback server"
+			print("No pbs fallback server")
 			sys.exit(1)
 		else:
 			con = pbs.pbs_connect(pbs_server)
 			if con == -1:
-				print "pbs fallback server connection failed"
+				print("pbs fallback server connection failed")
 				sys.exit(1)
 
-	print "Connected to %s" %(pbs_server)
+	print("Connected to %s" %(pbs_server))
 
 def method2():
@@ -39,5 +39,5 @@
 		server_list = pbs.pbs_get_server_list().split(',')
 	except AttributeError, detail:
-		print 'The installed torque version does not support pbs_get_server_list function'
+		print('The installed torque version does not support pbs_get_server_list function')
 		sys.exit(1)
 	for server in server_list:
@@ -48,8 +48,8 @@
 
 	if con == -1:
-		print 'Could not connect to a server (%s)' %('.'.join(server_list))
+		print('Could not connect to a server (%s)' %('.'.join(server_list)))
 		sys.exit(1)
 
-	print "Connected to %s" %(pbs_server)
+	print("Connected to %s" %(pbs_server))
 
 
Index: /trunk/examples/logpbs.py
===================================================================
--- /trunk/examples/logpbs.py	(revision 355)
+++ /trunk/examples/logpbs.py	(revision 356)
@@ -15,5 +15,5 @@
    #
    if pbs.log_open('', '.'):
-     print 'Could not open log file'
+     print('Could not open log file')
      sys.exit(1)
 
@@ -27,5 +27,5 @@
    #
    if pbs.log_open('', '/var/spool/torque/sched_logs'):
-     print 'Could not open log file in /var/spool/torque/sched_logs'
+     print('Could not open log file in /var/spool/torque/sched_logs')
      sys.exit(1)
 
Index: /trunk/examples/new_interface.py
===================================================================
--- /trunk/examples/new_interface.py	(revision 355)
+++ /trunk/examples/new_interface.py	(revision 356)
@@ -34,6 +34,6 @@
   node = p.getnode("r2n2", l)
 
-  print node.name
-  print node.name, node['np']
+  print(node.name)
+  print(node.name, node['np'])
 
   sys.exit(0)
@@ -41,13 +41,13 @@
   #nodes = p.getnodes(l)
   for id in nodes:
-	print id
+	print(id)
 
 	try:
-		print nodes[id].np
-		print nodes[id].status.arch
-		print nodes[id].status.uname
-		print nodes[id].state
+		print(nodes[id].np)
+		print(nodes[id].status.arch)
+		print(nodes[id].status.uname)
+		print(nodes[id].state)
 	except PBSError, detail:
-		print detail
+		print(detail)
 		pass
 	
Index: /trunk/examples/node_event_parse.py
===================================================================
--- /trunk/examples/node_event_parse.py	(revision 355)
+++ /trunk/examples/node_event_parse.py	(revision 356)
@@ -19,3 +19,3 @@
 p = PBSQuery()
 node = p.getnode('gb-r7n3')
-print node['event']
+print(node['event'])
Index: /trunk/examples/pbs_joblogin
===================================================================
--- /trunk/examples/pbs_joblogin	(revision 355)
+++ /trunk/examples/pbs_joblogin	(revision 356)
@@ -42,16 +42,16 @@
 def usage(a):
   if a == 'pbs_jobmonitor':
-    print a,'shows the system usage of a node where a job is running'
+    print(a,'shows the system usage of a node where a job is running')
   if a == 'pbs_joblogin':
-    print a,'logs you in to a node where a job is running'
+    print(a,'logs you in to a node where a job is running')
     
-  print 'Usage:'
-  print a,'<jobnumber> [nodenumber]'
-  print 'where <jobnumber> is the number of the job'
-  print '      nodenumber is the rank number of the node allocated to the job'
-  print '      (default 0)'
+  print('Usage:')
+  print(a,'<jobnumber> [nodenumber]')
+  print('where <jobnumber> is the number of the job')
+  print('      nodenumber is the rank number of the node allocated to the job')
+  print('      (default 0)')
   
 me = sys.argv[0].split('/')[-1]
-print '['+me+']'
+print('['+me+']')
 p = PBSQuery()
 
@@ -76,5 +76,5 @@
   h = job['exec_host'][0]
 except:
-  print 'No such job:',j
+  print('No such job:',j)
   sys.exit(1)
 
@@ -85,22 +85,22 @@
 
 nodes = uniq(nodes)
-print 'Job',j,'is running on',len(nodes),'nodes:'
+print('Job',j,'is running on',len(nodes),'nodes:')
 i=0
 for h in nodes:
-  print h,
+  print(h, end=' ')
   i = i+1
   if i > 7:
     i=0
-    print
+    print()
 if i != 0:
-  print
+  print()
 
 if num >= len(nodes):
-  print 'No node number',num
+  print('No node number',num)
   sys.exit(1)
 
 if me == 'pbs_jobmonitor':
   user=job['Job_Owner'][0].split('@')[0]
-  print 'top for node #',num,':',nodes[num],'user:',user
+  print('top for node #',num,':',nodes[num],'user:',user)
   sys.stdout.flush()
   os.system('ssh '+nodes[num]+' top -n1 -b -u ' + user)
@@ -108,5 +108,5 @@
 if me == 'pbs_joblogin':
   user = os.getenv('USER')
-  print 'logging in to node #',num,':',nodes[num],'user:',user
+  print('logging in to node #',num,':',nodes[num],'user:',user)
   sys.stdout.flush()
   os.system('ssh -X '+nodes[num])
Index: /trunk/examples/pbs_jobmonitor
===================================================================
--- /trunk/examples/pbs_jobmonitor	(revision 355)
+++ /trunk/examples/pbs_jobmonitor	(revision 356)
@@ -42,16 +42,16 @@
 def usage(a):
   if a == 'pbs_jobmonitor':
-    print a,'shows the system usage of a node where a job is running'
+    print(a,'shows the system usage of a node where a job is running')
   if a == 'pbs_joblogin':
-    print a,'logs you in to a node where a job is running'
+    print(a,'logs you in to a node where a job is running')
     
-  print 'Usage:'
-  print a,'<jobnumber> [nodenumber]'
-  print 'where <jobnumber> is the number of the job'
-  print '      nodenumber is the rank number of the node allocated to the job'
-  print '      (default 0)'
+  print('Usage:')
+  print(a,'<jobnumber> [nodenumber]')
+  print('where <jobnumber> is the number of the job')
+  print('      nodenumber is the rank number of the node allocated to the job')
+  print('      (default 0)')
   
 me = sys.argv[0].split('/')[-1]
-print '['+me+']'
+print('['+me+']')
 p = PBSQuery()
 
@@ -76,5 +76,5 @@
   h = job['exec_host'][0]
 except:
-  print 'No such job:',j
+  print('No such job:',j)
   sys.exit(1)
 
@@ -85,20 +85,20 @@
 
 nodes = uniq(nodes)
-print 'Job',j,'is running on',len(nodes),'nodes:'
+print('Job',j,'is running on',len(nodes),'nodes:')
 i=0
 for h in nodes:
-  print h,
+  print(h, end=' ')
   i = i+1
 
 if i != 0:
-  print
+  print()
 
 if num >= len(nodes):
-  print 'No node number',num
+  print('No node number',num)
   sys.exit(1)
 
 if me == 'pbs_jobmonitor':
   user=job['Job_Owner'][0].split('@')[0]
-  print 'top for node #',num,':',nodes[num],'user:',user
+  print('top for node #',num,':',nodes[num],'user:',user)
   sys.stdout.flush()
   os.system('ssh '+nodes[num]+' top -n1 -b -u ' + user)
@@ -106,5 +106,5 @@
 if me == 'pbs_joblogin':
   user = os.getenv('USER')
-  print 'logging in to node #',num,':',nodes[num],'user:',user
+  print('logging in to node #',num,':',nodes[num],'user:',user)
   sys.stdout.flush()
   os.system('ssh -X '+nodes[num])
Index: /trunk/examples/pbs_version.py
===================================================================
--- /trunk/examples/pbs_version.py	(revision 355)
+++ /trunk/examples/pbs_version.py	(revision 356)
@@ -15,5 +15,5 @@
   pbs_server = pbs.pbs_default()
   if not pbs_server:
-    print 'No default server'
+    print('No default server')
     sys.exit(1)
 
@@ -25,7 +25,7 @@
   server_info = pbs.pbs_statserver(con, attr_l, 'NULL')
   for entry in server_info:
-    print entry.name
+    print(entry.name)
     for attrib in entry.attribs:
-       print '\t', attrib.name, ' = ', attrib.value
+       print('\t', attrib.name, ' = ', attrib.value)
 
 main()
Index: /trunk/examples/pbsmon.py
===================================================================
--- /trunk/examples/pbsmon.py	(revision 355)
+++ /trunk/examples/pbsmon.py	(revision 356)
@@ -63,13 +63,13 @@
   while start < items:
 
-    print ' ',
+    print(' ', end=' ')
     for j in range(start,end):
-      print format %(nl[j]) ,
+      print(format %(nl[j]), end=' ')
 
-    print '\n ',
+    print('\n ', end=' ')
     for j in range(start,end):
-      print format %(sl[j]) ,
+      print(format %(sl[j]), end=' ')
    
-    print '\n'
+    print('\n')
 
     start = end
@@ -84,7 +84,7 @@
   for key in translate_state.keys():
     value = translate_state[key]
-    print "%3s %-21s : %d\t |" %( value, key, sl.count(value) ),
+    print("%3s %-21s : %d\t |" %( value, key, sl.count(value) ), end=' ')
     if n%2:
-      print ''
+      print('')
     n = n + 1
 
@@ -99,5 +99,5 @@
     pbs_server = pbs.pbs_default()
     if not pbs_server:
-      print "No default pbs server, usage: pbsmon [server] "
+      print("No default pbs server, usage: pbsmon [server] ")
       sys.exit(1)
 
@@ -105,5 +105,5 @@
   if con < 0:
      errno, text = pbs.error()
-     print errno, text
+     print(errno, text)
      sys.exit(1)
 
Index: /trunk/examples/pbsnodes-a.py
===================================================================
--- /trunk/examples/pbsnodes-a.py	(revision 355)
+++ /trunk/examples/pbsnodes-a.py	(revision 356)
@@ -19,5 +19,5 @@
   pbs_server = pbs.pbs_default()
   if not pbs_server:
-    print "No default pbs server"
+    print("No default pbs server")
     sys.exit(1)
 
@@ -27,7 +27,7 @@
 
   for node in nodes:
-    print node.name
+    print(node.name)
     for attrib in node.attribs:
-      print '\t', attrib.name, '=', attrib.value
+      print('\t', attrib.name, '=', attrib.value)
 
 main()
Index: /trunk/examples/rack_pbsmon.py
===================================================================
--- /trunk/examples/rack_pbsmon.py	(revision 355)
+++ /trunk/examples/rack_pbsmon.py	(revision 356)
@@ -44,5 +44,5 @@
 
 	if not pbs_server:
-		print 'No default pbs server, usage: %s [server]' % os.path.basename(sys.argv[0])
+		print('No default pbs server, usage: %s [server]' % os.path.basename(sys.argv[0]))
 		sys.exit(1)
 
@@ -50,5 +50,5 @@
 	if con < 0:
 		errno, text = pbs.error()
-		print errno, text
+		print(errno, text)
 		sys.exit(1)
 
@@ -86,11 +86,11 @@
 
 # print nodes with gb-r%dn%d naming scheme
-	print '  ',
+	print('  ', end=' ')
 	for rack in xrange(1, N_RACKS+1):
-		print '%2d' % rack,
-	print
+		print('%2d' % rack, end=' ')
+	print()
 
 	for node_nr in xrange(1, NODES_PER_RACK+1):
-		print '%2d' % node_nr,
+		print('%2d' % node_nr, end=' ')
 
 		for rack in xrange(1, N_RACKS+1):
@@ -98,17 +98,17 @@
 
 			if node_dict.has_key(node_name):
-				print ' %s' % node_dict[node_name],
+				print(' %s' % node_dict[node_name], end=' ')
 
 				del node_dict[node_name]
 			else:
-				print '  ',
+				print('  ', end=' ')
 
 		if node_nr-1 < len(legend):
 			state = legend[node_nr-1]
-			print '  %s  %-13s : %d' % (PBS_STATES[state], state, count_states[state])
+			print('  %s  %-13s : %d' % (PBS_STATES[state], state, count_states[state]))
 		else:
-			print
+			print()
 
-	print
+	print()
 
 # any other nodes?
@@ -118,7 +118,7 @@
 
 		for node in arr:
-			print '%s %s' % (node, node_dict[node])
+			print('%s %s' % (node, node_dict[node]))
 
-		print
+		print()
 
 #	n = 0
Index: /trunk/examples/resmom_info.py
===================================================================
--- /trunk/examples/resmom_info.py	(revision 355)
+++ /trunk/examples/resmom_info.py	(revision 356)
@@ -19,8 +19,8 @@
 
   for node in nodes:
-    print node.name, ' :'
+    print(node.name, ' :')
     attrs = node.attribs
     for attr in attrs:
-      print '\t%s = %s' %(attr.name, attr.value)
+      print('\t%s = %s' %(attr.name, attr.value))
 
     try:
@@ -33,13 +33,13 @@
     mom_keys = pbs.get_mom_values(mom_id)
     for key in mom_keys.keys():
-      print '\t%s = %s' %(key, mom_keys[key])
+      print('\t%s = %s' %(key, mom_keys[key]))
 
-    print '\nTesting list with user supplied keywords'
+    print('\nTesting list with user supplied keywords')
 
     l = [ 'bas', 'ncpus', 'loadave' ]
     mom_keys = pbs.get_mom_values(mom_id, l)
     for key in mom_keys.keys():
-      print '\t%s = %s' %(key, mom_keys[key])
-    print ''
+      print('\t%s = %s' %(key, mom_keys[key]))
+    print('')
     pbs.closerm(mom_id)
 
Index: /trunk/examples/set_property.py
===================================================================
--- /trunk/examples/set_property.py	(revision 355)
+++ /trunk/examples/set_property.py	(revision 356)
@@ -16,9 +16,9 @@
   pbs_server = pbs.pbs_default()
   if not pbs_server:
-    print 'No default server'
+    print('No default server')
     sys.exit(1)
 
   if len(sys.argv) < 2:
-  	print "Usage: set_property.py <hostname>"
+  	print("Usage: set_property.py <hostname>")
 	sys.exit(1)
 
@@ -36,7 +36,7 @@
 
   if r > 0:
-    print r, ";"
+    print(r, ";")
     errno, text = pbs.error() 
-    print errno, text
+    print(errno, text)
 
 main()
