def listener2(threadName, delay):#threadName, delay global f rospy.Subscriber("mouth_color", Int8, callback2) # spin() simply keeps python from exiting until this node is stopped rospy.spin()