Beware: Not production quality and I did edit a bit with out running.
#!/usr/bin/python
from py3270 import Emulator
from subprocess import call
import threading
import time
import sys
import logging
def runOne(name):
em = Emulator(visible=True)
try:
em.connect('NNN.16.81.137:3270')
except:
print "Connection issue - Region probably not started."
sys.exit(1)
transId = 'MENU'
em.fill_field(8, 13, 'USERID', 8)
em.fill_field(9, 13, 'XXXXXX', 8)
em.send_enter()
# if your host unlocks the keyboard before truly being ready you can use:
# em.wait_for_field()
em.send_string(transId)
em.send_enter()
time.sleep(1)
em.send_string('123456')
em.send_enter()
time.sleep(10)
em.terminate()
t1 = threading.Thread(target=runOne, args = ('one',))
t1.start()
t2 = threading.Thread(target=runOne, args = ('two',))
t2.start()
t1 = threading.Thread(target=runOne, args = ('three',))
t1.start()
t2 = threading.Thread(target=runOne, args = ('four',))
t2.start()
t1 = threading.Thread(target=runOne, args = ('five',))
t1.start()