py3270 - exec_command('EBCDIC - ... doubt

Skip to first unread message

Victor Rafael Ravagnani

Feb 24, 2018, 8:04:08 AM2/24/18
to BlazeLibs
Hello gentleman

I'm using py3270 to assemble some databases (great library by the way and Thank you very much Randy for all maintenance and improvements).

One thing that I believe you all could give me a hint is that:
  • the information contained in my AS/400 terminal data is in cp037(EBCDIC) and when retrieving data from the socket, the standard convertion in the py3270 algo/__init__ line 62 is ascii and im facing issues with compatibility in decoding the data since it raises issues in some non suported ascii char map.

is there a way to either decode or use EBCDIC translation to text?

Randy Syring

Mar 29, 2018, 11:15:31 AM3/29/18
to Victor Rafael Ravagnani,
Hi Victor,

You are welcome, although the real complements go to the guy who created and maintains x3270, it does all the dirty work.

Yah, there is definitely some naivety in py3270 around byte handling.  If you want to create a PR to fix it, just make sure when you are done that all the tests pass and I'll merge it.  Or, if you think you'll be working with py3270 for awhile and want to help maintain it, the project could use help:


Randy Syring
Husband | Father | Redeemed Sinner

"For what does it profit a man to gain the whole world
and forfeit his soul?" (Mark 8:36 ESV)

You received this message because you are subscribed to the Google Groups "BlazeLibs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Reply all
Reply to author
0 new messages