A Python interface for Attachmate Extra Terminal sessions
Project description
py-troya-connect
A Python interface for Attachmate Extra Terminal sessions.
Installation
pip install py-troya-connect
Basic Usage
from py_troya_connect import ExtraTerminal
# Initialize terminal connection
terminal = ExtraTerminal("1") # Connect to session 1
# Read screen content
screen_content = terminal.read_screen()
print("Screen content:", screen_content)
# Send a command and get response
terminal.send_command("your_command")
response = terminal.read_screen()
print("Command response:", response)
Session Selection
from py_troya_connect import ExtraTerminal
# List available sessions
terminal = ExtraTerminal("1")
sessions = terminal.list_available_sessions()
print("Available sessions:", sessions)
# Output: [{'index': 1, 'name': 'Session1', 'connected': True}, ...]
# Interactive session selection
session_choice = ExtraTerminal.select_session()
new_terminal = ExtraTerminal(session_choice)
Advanced Usage
from py_troya_connect import ExtraTerminal
# Initialize connection
terminal = ExtraTerminal("1")
# Check system status
status = terminal.check_system_status()
print("System status:", status)
# Send command with special keys
terminal.send_command("command{ENTER}") # Will be formatted as "command<ENTER>"
# Wait for specific text to appear
if terminal.wait_for_text("Expected text", timeout=30):
print("Text found!")
response = terminal.read_screen()
print("Current screen:", response)
Requirements
- Windows OS
- Attachmate Extra! Terminal
- Python 3.6+
- pywin32
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_troya_connect-0.1.26.tar.gz.
File metadata
- Download URL: py_troya_connect-0.1.26.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da7fd8d39d05e9ad2aba831b9586f37c1154494ba64a6eb52ff4588d3d4d928
|
|
| MD5 |
51a7e0747b9f92af11671735600982c3
|
|
| BLAKE2b-256 |
849325afedc349e1608158f990df674193ff998f3a4d90cf0f7048b7870bd53a
|
File details
Details for the file py_troya_connect-0.1.26-py3-none-any.whl.
File metadata
- Download URL: py_troya_connect-0.1.26-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f68f065dccc3885a2d54c89658f9a9551945a881dcf0a8f8de03d19cda61ae0
|
|
| MD5 |
1d6bd9ab2a9a66d69a5c41163839745f
|
|
| BLAKE2b-256 |
214d060f66709ad1d9310804178f8b6d50c27a28ff73969b1002c591f089b5d9
|