# py-troya-connect
A Python interface for Attachmate Extra Terminal sessions.
## Installation
```bash
pip install py-troya-connect
```
## Quick Start
```python
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
```python
# Let user choose session
session_choice = ExtraTerminal.select_session()
terminal = ExtraTerminal(session_choice)
# Read current screen
screen_text = terminal.read_screen()
```
## Error Handling
```python
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
```python
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
Raw data
{
"_id": null,
"home_page": "https://github.com/tolgakurtuluss/py-troya-connect",
"name": "py-troya-connect",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "terminal, attachmate, extra, automation, thy, turkish airlines",
"author": "Tolga Kurtulus",
"author_email": "tolgakurtulus95@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/49/d9/172796e9785037877fd4b51ba9696cf1d28debfad39b1dec1e086798eeb1/py_troya_connect-0.1.28.tar.gz",
"platform": null,
"description": "# py-troya-connect\r\n\r\nA Python interface for Attachmate Extra Terminal sessions.\r\n\r\n## Installation\r\n\r\n```bash\r\npip install py-troya-connect\r\n```\r\n\r\n## Quick Start\r\n\r\n```python\r\nfrom py_troya_connect import ExtraTerminal\r\n\r\n# Connect to first available session\r\nterminal = ExtraTerminal(\"1\")\r\n\r\n# Send command and read response\r\nterminal.send_command(\"your_command\")\r\nscreen_text = terminal.read_screen()\r\n```\r\n\r\n## Interactive Session Selection\r\n\r\n```python\r\n# Let user choose session\r\nsession_choice = ExtraTerminal.select_session()\r\nterminal = ExtraTerminal(session_choice)\r\n\r\n# Read current screen\r\nscreen_text = terminal.read_screen()\r\n```\r\n\r\n## Error Handling\r\n\r\n```python\r\nfrom py_troya_connect import ExtraTerminal, TerminalBusyError\r\n\r\ntry:\r\n terminal = ExtraTerminal(\"1\")\r\n terminal.send_command(\"command\")\r\n \r\n # Wait for specific text with timeout\r\n if terminal.wait_for_text(\"Expected text\", timeout=10):\r\n print(\"Text found!\")\r\nexcept TerminalBusyError:\r\n print(\"Terminal is busy\")\r\n```\r\n\r\n## System Status Check\r\n\r\n```python\r\nterminal = ExtraTerminal(\"1\")\r\nstatus = terminal.check_system_status()\r\n# Returns: {'Extra Version': '1.0', 'Session Count': 2, 'Available Sessions': ['Session1', 'Session2']}\r\n```\r\n\r\n## Requirements\r\n\r\n- Windows OS\r\n- Attachmate Extra! Terminal\r\n- Python 3.6+\r\n- pywin32\r\n\r\n## License\r\n\r\nMIT License\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python interface for Attachmate Extra Terminal sessions",
"version": "0.1.28",
"project_urls": {
"Bug Tracker": "https://github.com/tolgakurtuluss/py-troya-connect/issues",
"Documentation": "https://github.com/tolgakurtuluss/py-troya-connect/wiki",
"Homepage": "https://github.com/tolgakurtuluss/py-troya-connect",
"Source Code": "https://github.com/tolgakurtuluss/py-troya-connect"
},
"split_keywords": [
"terminal",
" attachmate",
" extra",
" automation",
" thy",
" turkish airlines"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "117708a5706d8f179432c32f7c64652acc03192e96a6a4ee89610f5136a68658",
"md5": "b90571fe3a4ee9a6ea8aa4dcae9c0f36",
"sha256": "31ac5050be9907b1cb90fafadcc4e4a1f92eff90836e52f683fc8bccb5cf7e40"
},
"downloads": -1,
"filename": "py_troya_connect-0.1.28-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b90571fe3a4ee9a6ea8aa4dcae9c0f36",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 7189,
"upload_time": "2025-02-24T09:40:49",
"upload_time_iso_8601": "2025-02-24T09:40:49.239252Z",
"url": "https://files.pythonhosted.org/packages/11/77/08a5706d8f179432c32f7c64652acc03192e96a6a4ee89610f5136a68658/py_troya_connect-0.1.28-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "49d9172796e9785037877fd4b51ba9696cf1d28debfad39b1dec1e086798eeb1",
"md5": "7caeefcfc1892ed5120a3c94844cd123",
"sha256": "db85f2a731531aabf9ae16458d1e499d234ca0cd73c5059439c2f07a7b3573e1"
},
"downloads": -1,
"filename": "py_troya_connect-0.1.28.tar.gz",
"has_sig": false,
"md5_digest": "7caeefcfc1892ed5120a3c94844cd123",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 8187,
"upload_time": "2025-02-24T09:40:51",
"upload_time_iso_8601": "2025-02-24T09:40:51.602412Z",
"url": "https://files.pythonhosted.org/packages/49/d9/172796e9785037877fd4b51ba9696cf1d28debfad39b1dec1e086798eeb1/py_troya_connect-0.1.28.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-24 09:40:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tolgakurtuluss",
"github_project": "py-troya-connect",
"github_not_found": true,
"lcname": "py-troya-connect"
}