Python Spin Once Equivalent
Is there an equivalent to spin_once (C++) in ROS for Python?
In C++ I have a loop with spin_once and during each iteration of the loop the code checks a couple of global variables for changes and then does some action based on the value of those global variables. The global variables are based on messages from other nodes' topics to which my C++ ROS node is subscribed. How would this code structure translate into Python?