More pythonesc loop for the open loop algo.