py3270 0.3.5
A Python interface to x3270, an IBM 3270 terminal emulator
License: BSD


|license| |pypi| |coverage| |bugs| |code smells| |vulnerabilities|
|duplicated lines|

Intro
-----

py3270 is a Python interface to x3270, an IBM 3270 terminal emulator.
It provides an API to a x3270 or s3270 subprocess.

Example
--------

The x3270 executables need to be on your PATH!

A brief example of usage:

.. code:: python

    from py3270 import Emulator

    # use x3270 so you can see what is going on
    em = Emulator(visible=True)

    # or not (uses s3270)
    em = Emulator()

    em.connect('3270host.example.com')
    em.fill_field(17, 23, 'mylogin', 8)
    em.fill_field(18, 23, 'mypass', 8)
    em.send_enter()

    # if your host unlocks the keyboard before truly being ready you can use:
    em.wait_for_field()

    # maybe look for a status message
    if not em.string_found(1, 2, 'login succesful'):
        abort()

    # do something useful

    # disconnect from host and kill subprocess
    em.terminate()

Documentation
--------------

None, sorry. Read the code, its pretty simple & self-explanatory  :)

More information on x3270/s3270 can be found at:

* http://x3270.bgp.nu/
* http://x3270.bgp.nu/x3270-man.html
* http://x3270.bgp.nu/s3270-man.html
* http://x3270.bgp.nu/x3270-script.html

Questions & Comments
---------------------

Please submit a issue or visit: http://groups.google.com/group/blazelibs

Current Status
---------------

The interface seems sound, but the Emulator class has only basic functionality.
There are more x3270 commands that the Emulator could have methods for. That
being said, I believe most x3270 functionality can be supported at a lower-level
by the use of Emulator.exec_command().

py3270 is installable via `pip` with ``pip install py3270`` or `easy_install`
with ``easy_install py3270``.

.. |license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
    :target: https://opensource.org/licenses/BSD-3-Clause
    :alt: BSD-3-Clause

.. |pypi| image:: https://img.shields.io/pypi/v/py3270.svg
    :target: https://pypi.python.org/pypi/py3270
    :alt: Latest version released on PyPi

.. |coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=py3270&metric=coverage
    :target: https://sonarcloud.io/component_measures?id=py3270&metric=coverage
    :alt: Test coverage

.. |bugs| image:: https://sonarcloud.io/api/project_badges/measure?project=py3270&metric=bugs
    :target: https://sonarcloud.io/component_measures?id=py3270&metric=bugs
    :alt: Bugs

.. |code smells| image:: https://sonarcloud.io/api/project_badges/measure?project=py3270&metric=code_smells
    :target: https://sonarcloud.io/component_measures?id=py3270&metric=code_smells
    :alt: Code Smells

.. |vulnerabilities| image:: https://sonarcloud.io/api/project_badges/measure?project=py3270&metric=vulnerabilities
    :target: https://sonarcloud.io/component_measures?id=py3270&metric=vulnerabilities
    :alt: Vulnerabilities

.. |duplicated lines| image:: https://sonarcloud.io/api/project_badges/measure?project=py3270&metric=duplicated_lines_density
    :target: https://sonarcloud.io/component_measures?id=py3270&metric=duplicated_lines_density
    :alt: Duplicated Lines Density


Change Log
----------

0.3.5 released 2018-10-23
============================

- Added explicit license
- Reorganizing project structure
- Fix exception handling in sockets
- Fix exception in terminate command (wc3270)
- Code styling and minor fixes

0.3.4 released 2017-07-24
============================

- Fix BrokenPipeError issue WRT Python 2.7

0.3.3 released 2016-01-21
=========================

- continued fix to broken version import (include version in manifest)

0.3.2 released 2016-01-21
=========================

- fix broken version import in setup.py (broken in 0.3.0 and 0.3.1)

0.3.1 released 2016-01-21
=========================

- fix testing support for Python 3
- fix Windows support for Python 3
- move to github, related updates to vcs-specific files

0.3.0 released 2015-07-29
=========================

- Support Python 3

0.2.0 released 2014-03-28
=========================

- Add Windows support, but not tested thoroughly.Consider Windows supportExperimental.
- use x3270 executables from PATH instead of requiring ExamBase to be subclassed
- fix buffering problems when writing to x3270 subprocess

0.1.5 released 2013-06-17
=========================

- changed default timeout to 30 seconds
- added send_pf7(), send_pf8()

0.1.4 released 2012-03-17
=========================

- added is_connected() method

0.1.3 released 2011-12-06
=========================

- had messed up a previous upload to pypi releasing a fixed 0.1.1 as 0.1.2, so
    need to go to next version number

0.1.2 released 2011-12-06
=========================

- fix data parsing on Windows

0.1.1 released 2011-12-05
=========================

- renamed Emulator to EmulatorBase to make it clearer that a subclass is needed
- adjusted readme

0.1.0 released 2011-12-01
=========================

- initial release