{"id":21834223,"url":"https://github.com/IBM/tnz","last_synced_at":"2025-07-20T16:31:18.509Z","repository":{"id":37079647,"uuid":"435205769","full_name":"IBM/tnz","owner":"IBM","description":"Tn3270 to Z Python library","archived":false,"fork":false,"pushed_at":"2024-10-22T00:58:45.000Z","size":2371,"stargazers_count":57,"open_issues_count":19,"forks_count":14,"subscribers_count":14,"default_branch":"main","last_synced_at":"2024-10-22T14:35:02.186Z","etag":null,"topics":["command-line","emulator","mainframe","mouse","shell","terminal","tui","zos"],"latest_commit_sha":null,"homepage":"https://ibm.github.io/tnz/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IBM.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"docs/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-05T15:31:54.000Z","updated_at":"2024-10-22T00:58:15.000Z","dependencies_parsed_at":"2024-08-26T23:12:54.301Z","dependency_job_id":"af29eaba-2eb2-4c49-b29c-57512fa776f4","html_url":"https://github.com/IBM/tnz","commit_stats":{"total_commits":47,"total_committers":6,"mean_commits":7.833333333333333,"dds":"0.17021276595744683","last_synced_commit":"964a100de1259bedd4edd891c3434c07f7d46aed"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftnz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftnz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftnz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IBM%2Ftnz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IBM","download_url":"https://codeload.github.com/IBM/tnz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226814497,"owners_count":17686302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line","emulator","mainframe","mouse","shell","terminal","tui","zos"],"created_at":"2024-11-27T20:02:05.328Z","updated_at":"2025-07-20T16:31:18.502Z","avatar_url":"https://github.com/IBM.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"[![CI/CD Status](\nhttps://github.com/IBM/tnz/actions/workflows/pipeline.yml/badge.svg\n)](https://github.com/IBM/tnz/actions/workflows/pipeline.yml)\n[![PyPi Status](\nhttps://img.shields.io/pypi/v/tnz.svg\n)](https://pypi.org/project/tnz)\n[![PyPi Downloads](\nhttps://img.shields.io/pypi/dm/tnz\n)](https://pypi.org/project/tnz)\n[![OpenSSF Best Practices](\nhttps://bestpractices.coreinfrastructure.org/projects/6762/badge\n)](https://bestpractices.coreinfrastructure.org/projects/6762)\n\n# tnz\n\nUse a standard terminal emulator as a 3270 terminal interface. Write\nscripts to automate 3270 terminal interaction. This is both a 3270\nterminal emulator and a Python library. The zti module provides a 3270\nuser interface through a Windows Command Prompt or a unix/ascii\nterminal. The tnz module handles the interface to the 3270 data\nstream. The ati module allows for easier 3270 terminal automation.\n\n#### Features\n* Runs on many platforms (including z/OS)\n* Secure telnet (TLS) _by default_\n* Manages multiple 3270 sessions at the same time\n* Lightweight - does not duplicate standard terminal function\n* Code page 310 for APL graphic symbols (i.e. 3278T terminal type)\n\n## Installing\n\nPython 3.6 or later is required.\nAlthough not required, on platforms other than z/OS, it is suggested\nyou also install the [ebcdic](https://pypi.org/project/ebcdic)\npackage from PyPI.\nUse pip to install the latest tnz:\n```console\npip3 install ebcdic tnz\n```\n\n## Usage\n### Automation\nSee [examples](\nhttps://github.com/IBM/tnz/tree/main/examples\n) to get started writing a script to automate 3270 interaction.\n\n### Emulator\nRun the installed zti (Z Terminal Interface) script to start the\nemulator:\n```console\nzti\n```\n\nIf your path is not set up for running the installed zti console script,\nyou can run zti with `python -m tnz.zti` instead.\n\nStarting `zti` takes you into the zti command line interface shell.\nKey tab for command completion, up/down for command history.\n![screenshot](\nhttps://github.com/IBM/tnz/raw/main/docs/png/zti-prompt1.png\n\"shell\")\n\nThe `goto` command takes you to a full screen 3270 interface. When\nspace is available in the terminal screen/window, a status line is\nprovided as well as a session selector.\n\nThe basic syntax of `goto` is: \n\n```\ngoto fully-qualified-host-name[:port]\n```\n\n![screenshot](\nhttps://github.com/IBM/tnz/raw/main/docs/png/zti-host1.png\n\"3270 full screen\")\n\nIn Windows, the Lucida Console font works well with graphic character\nAPL symbols exploited by ISPF.\n![screenshot](\nhttps://github.com/IBM/tnz/raw/main/docs/png/zti-host2.png\n\"Screenshot with APL symbols\")\n\nLarge and arbitrarily-sized screens are supported.\n![screenshot](\nhttps://github.com/IBM/tnz/raw/main/docs/png/zti-host3.png\n\"Screenshot with large size\")\n\nStandard unix/ascii terminals are supported. In the screenshot below,\nPuTTY is used as the terminal emulator. The connection was made from\nPuTTY to z/OS via ssh and zti is running on z/OS.\n![screenshot](\nhttps://github.com/IBM/tnz/raw/main/docs/png/zti-host4.png\n\"Screenshot using PuTTY\")\n\nThe code in this repository aims to be portable. To achieve this, the\nnumber of dependencies is kept to a minimum. The only hard\nrequirement across platforms is Python and the Python Standard\nLibrary. Though it is likely you will also want additional ebcdic\ncode pages in order to use your code page of choice (i.e. the ebcdic\npackage).\n\n#### Emulator Features\n* Use Alt+letter to access ISPF menus\n* Mouse click sets cursor position\n* Mouse double-click sets cursor position and send Enter\n* Use any EBCDIC code page available to Python\n* Use of code page 310 for APL graphic symbols\n* Paste multiline block of text\n\n## Running zti on Windows\n\nThe trapping of the keyboard disables keyboard shortcuts documented\nin the Control-menu-\u003eEdit menu. But the functions can still be\naccessed through the Control-menu. For example: mouse click top-left\ncorner, E (Edit), F (Find) to find text.\n\n**To copy text in Command Prompt, make sure that the Quick Edit Mode\noption is selected in the Properties accessed through the\nControl-menu. Then you can hold Shift while using the mouse to\nselect text. Once the text is selected, press Enter to copy the\ntext.** There are other ways to select text, but I this to be the\neasiest.\n\nBefore establishing a session, get the window sized the way you want\nit. Window resizing is not handled well in Windows. If you _do_\nresize, just use Esc to get to the command prompt then `goto` to get\nback to the session.\n\nControl-menu-\u003eProperties will take you to properties for the\nterminal. The character size and font can be set. I recommend\n**Lucida Console** - it is readable and the graphic symbols are\nfairly good at connecting like they are supposed to.\n\n\n## Documentation\n\nSee [here](https://ibm.github.io/tnz/).\n\nFor additional details, see docstrings in source code.\n\n## Contributing\nSee [CONTRIBUTING.md](\nhttps://github.com/IBM/tnz/blob/main/CONTRIBUTING.md\n).\n\n## Security\nSee [SECURITY.md](https://github.com/IBM/tnz/blob/main/SECURITY.md).\n\n## Acknowledgments\nHats off to the team responsible for the IBM internal Automated Task\nInterpreter (ATI) tool:\nRichard Lynch, Karen Eickemeyer, and Ronald Barber.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIBM%2Ftnz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIBM%2Ftnz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIBM%2Ftnz/lists"}