Skip to main content

An interface to x3270, an IBM 3270 terminal emulator

Project description

Intro

py3270 is a python interface to a x3270 or s3270 subprocess.

Example

A brief example of usage:

from py3270 import EmulatorBase

class Emulator(EmulatorBase):
    x3270_executable = '/fake/x3270'
    s3270_executable = '/fake/s3270'

# 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. Read the code, its pretty self-explanatory :)

More information on x3270/s3270 can be found at:

Questions & Comments

Please 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().

The py3270 tip is installable via easy_install with easy_install py3270==dev.

Change Log

0.1.0 released 2011-12-01

  • initial release

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

py3270-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file py3270-0.1.0.tar.gz.

File metadata

  • Download URL: py3270-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3270-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eaaa0eb620482bcc919e922d23e092ecc8d26e854e4ae57c34d7472d3037b954
MD5 1ac73c00429c82b5d19e267469ca8c13
BLAKE2b-256 9a03930b0153baa224275c0a05814b9ef159b68d7e10470baadc86fa92a1620a

See more details on using hashes here.

Provenance

Supported by

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