Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_troya_connect-0.1.26.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_troya_connect-0.1.26-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

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

Hashes for py_troya_connect-0.1.26.tar.gz
Algorithm Hash digest
SHA256 8da7fd8d39d05e9ad2aba831b9586f37c1154494ba64a6eb52ff4588d3d4d928
MD5 51a7e0747b9f92af11671735600982c3
BLAKE2b-256 849325afedc349e1608158f990df674193ff998f3a4d90cf0f7048b7870bd53a

See more details on using hashes here.

File details

Details for the file py_troya_connect-0.1.26-py3-none-any.whl.

File metadata

File hashes

Hashes for py_troya_connect-0.1.26-py3-none-any.whl
Algorithm Hash digest
SHA256 8f68f065dccc3885a2d54c89658f9a9551945a881dcf0a8f8de03d19cda61ae0
MD5 1d6bd9ab2a9a66d69a5c41163839745f
BLAKE2b-256 214d060f66709ad1d9310804178f8b6d50c27a28ff73969b1002c591f089b5d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page