Skip to content

Commit

Permalink
some python3 print fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fmessmer committed Jan 20, 2017
1 parent 0ebe0e2 commit 631fde0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cob_command_gui/src/knoeppkes.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def start(func, args):
if(largs[0] == "base"):
if(base_diff_enabled):
largs.append("diff")
#print "Args", tuple(largs)
#print "func ", func
#print("Args", tuple(largs))
#print("func ", func)
thread.start_new_thread(func,tuple(largs)) # exits silently without evaluating result

## use this function in order to evaluate result of action_handle, i.e. show pop-up or similar
Expand Down Expand Up @@ -203,15 +203,15 @@ def halt_all(self,component_names):

def setEMStop(self, em):
if(em):
#print "Emergency Stop Active"
#print("Emergency Stop Active")
gtk.threads_enter()
self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_command_gui") + "/common/files/icons/error.png")
self.status_label.set_text("EM Stop !")
gtk.threads_leave()
if(self.em_stop == False):
self.em_stop = True
else:
#print "Status OK"
#print("Status OK")
self.status_image.set_from_file(roslib.packages.get_pkg_dir("cob_command_gui") + "/common/files/icons/ok.png")
gtk.threads_enter()
self.status_label.set_text("Status OK")
Expand Down Expand Up @@ -301,7 +301,7 @@ def __init__(self):
gtk.gdk.threads_leave()

def signal_handler(signal, frame):
#print 'You pressed Ctrl+C!'
#print("You pressed Ctrl+C!")
gtk.main_quit()

if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion cob_monitoring/src/cpu_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ def publish_stats(self):
try:
rospy.init_node('cpu_monitor_%s' % hostname)
except rospy.exceptions.ROSInitException:
print >> sys.stderr, 'CPU monitor is unable to initialize node. Master may not be running.'
print('CPU monitor is unable to initialize node. Master may not be running.', file=sys.stderr)
sys.exit(0)

cpu_node = CPUMonitor(hostname, options.diag_hostname)
Expand Down
2 changes: 1 addition & 1 deletion cob_monitoring/src/hd_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def publish_stats(self):
node_name = ("hd_monitor_"+hostname).replace ("-", "_")
rospy.init_node(node_name)
except rospy.exceptions.ROSInitException:
print 'HD monitor is unable to initialize node. Master may not be running.'
print('HD monitor is unable to initialize node. Master may not be running.', file=sys.stderr)
sys.exit(0)

hd_monitor = hd_monitor(hostname, options.diag_hostname, options.directory)
Expand Down
2 changes: 1 addition & 1 deletion cob_monitoring/src/wifi_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def publish_stats(self):
try:
rospy.init_node('ddwrt_diag')
except rospy.exceptions.ROSInitException:
print 'Wifi monitor is unable to initialize node. Master may not be running.'
print('Wifi monitor is unable to initialize node. Master may not be running.', file=sys.stderr)
sys.exit(2)

wifi_monitor = WifiMonitor()
Expand Down

0 comments on commit 631fde0

Please sign in to comment.