Python code for interfacing with TEMPO