Python code to interact with a 3270 terminal emulator via HLLAPI