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

Quick Start

from py_troya_connect import ExtraTerminal

# Connect to first available session
terminal = ExtraTerminal("1")

# Send command and read response
terminal.send_command("your_command")
screen_text = terminal.read_screen()

Interactive Session Selection

# Let user choose session
session_choice = ExtraTerminal.select_session()
terminal = ExtraTerminal(session_choice)

# Read current screen
screen_text = terminal.read_screen()

Error Handling

from py_troya_connect import ExtraTerminal, TerminalBusyError

try:
    terminal = ExtraTerminal("1")
    terminal.send_command("command")
    
    # Wait for specific text with timeout
    if terminal.wait_for_text("Expected text", timeout=10):
        print("Text found!")
except TerminalBusyError:
    print("Terminal is busy")

System Status Check

terminal = ExtraTerminal("1")
status = terminal.check_system_status()
# Returns: {'Extra Version': '1.0', 'Session Count': 2, 'Available Sessions': ['Session1', 'Session2']}

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.27.tar.gz (7.1 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.27-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file py_troya_connect-0.1.27.tar.gz.

File metadata

  • Download URL: py_troya_connect-0.1.27.tar.gz
  • Upload date:
  • Size: 7.1 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.27.tar.gz
Algorithm Hash digest
SHA256 1d0400edab0e403e3b215046a6c73a5fad3fbd118ba9b54a61542d89ab920acf
MD5 e81118b98af1e04e291244766c70f111
BLAKE2b-256 0288d81e5b25a8e7b870150db0abad3732d2d19dcd02ac9d9ce1d6b838573412

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for py_troya_connect-0.1.27-py3-none-any.whl
Algorithm Hash digest
SHA256 6fd59f84295c25485ed53a4b2b9f69d6aeb5121a4b9708697af7bf33821a8147
MD5 503b4f398f7cf3fa7f6f0e26f9388c0e
BLAKE2b-256 b8d8fa71646c47aeec849f393762f888dd2c263246d2fc1dbc2765125f9a7609

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