This is a very severe bug. When calling Ptyprocess.read() the value returned is different almost every time:
ptyprocess.PtyProcess.spawn(['openssl', "ec", '-noout', '-text', '-in', '/opt/key/s128r1.key']).read()
The output:

And again with the same params:

And again:

I don't know what is causing this but this is very weird.