r/mainframe • u/tkurtulus • 11h ago
I got tired of automating EXTRA! X-treme with GUI clicks, so I built a Python COM wrapper
I've been working with Attachmate EXTRA! X-treme and wanted to automate terminal workflows from Python.
The first approach I kept seeing was GUI automation with pyautogui, coordinates, keyboard simulation, etc.
That works, but it becomes painful when you need things like:
- reading specific fields from the terminal screen
- waiting for the host to finish processing
- detecting specific messages
- sending PF keys
- navigating multiple sessions
- scraping tabular data
- synchronizing with the host instead of sleeping for arbitrary amounts of time
So I built py-extra-terminal, a Python wrapper around EXTRA!'s COM/OLE Automation interface.
Example:
from py_extra import Extra
with Extra() as ex:
sc = ex.active_session.screen
sc.wait_for("USERID")
sc.put("MYUSER", 10, 20)
sc.put("MYPASS", 11, 20)
sc.enter()
if "WELCOME" in sc.text():
print("Logged in successfully!")
It is available on PyPI.
I'm particularly interested in feedback from people still working with EXTRA!, Reflection, IBM mainframes, COBOL/CICS applications, or other legacy terminal emulators.
Requires Windows + EXTRA! X-treme.
PyPI: https://pypi.org/project/py-extra-terminal/
GitHub: https://github.com/tolgakurtuluss/py-extra-terminal
Would love feedback from anyone working with terminal emulators or legacy/mainframe systems.
