linuxpython-2.7terminal-emulator3270

X3270 Connection and Programming


I'm looking at using a X3270 terminal emulator. I have http://x3270.bgp.nu/ looked over this source material and still don't see how to start using the tool or configure it.

I'm wonder how I can open a terminal and connect. Another question is how could I integrate this into a python program?

edit: here is a snippet:

em = Emulator()     
em.connect(ip)
em.send_string('*user name*')
em.exec_command('Tab')
em.send_string('*user password*')
em.send_enter()
em.send_enter()
em.wait_for_field()
em.save_screen("{0}screenshot".format(*path*))

looking at the save screen i see that the cursor hasn't moved? I can move the cursor using

em.move_to(7,53)

but after that i don't get any text sent through. Any Ideas?


Solution

  • Please read my comment above first - it would be helpful to have more detail as to what you need to do.

    After considering that…have you looked at the py3270 package at https://pypi.python.org/pypi/py3270/0.1.5 ? The summary says it talks to x3270.