I create a project based on the py3270 package, but I found some problem in the py3270.
>>> b.rcms.string_get(14, 27, 8)
'11/10/20'
>>> b.rcms.string_get(12, 27, 8)
'14/10/19'
>>> b.rcms.string_get(12, 27, 8)
'11/10/20'
>>> b.rcms.string_get(14, 27, 8)
'11/10/20'
>>> b.rcms.string_get(14, 27, 8)
Traceback (most recent call last):
File "<pyshell#58>", line 1, in <module>
b.rcms.string_get(14, 27, 8)
File "C:\Program Files\Python27\lib\site-packages\py3270-0.1.5-py2.7.egg\py3270\__init__.py", line 276, in string_get
assert len(cmd.data) == 1, cmd.data
AssertionError: []
>>> b.rcms.string_get(14, 27, 8)
Traceback (most recent call last):
File "<pyshell#59>", line 1, in <module>
b.rcms.string_get(14, 27, 8)
File "C:\Program Files\Python27\lib\site-packages\py3270-0.1.5-py2.7.egg\py3270\__init__.py", line 274, in string_get
cmd = self.exec_command('Ascii({0},{1},{2})'.format(ypos, xpos, length))
File "C:\Program Files\Python27\lib\site-packages\py3270-0.1.5-py2.7.egg\py3270\__init__.py", line 158, in exec_command
c.execute()
File "C:\Program Files\Python27\lib\site-packages\py3270-0.1.5-py2.7.egg\py3270\__init__.py", line 50, in execute
return self.handle_result(result)
File "C:\Program Files\Python27\lib\site-packages\py3270-0.1.5-py2.7.egg\py3270\__init__.py", line 68, in handle_result
raise CommandError(msg)
CommandError: Unknown action: scii
>>> b.rcms.string_get(14, 27, 8)
'14/10/19'
the "b.rcms" is a Emulator instance, it seems that the py3270 has some buffer problem.
I try to resolved the problem through add stdin.flush() to the class command, like this:
............................