How do I convert a string 2 bytes long to an integer in python -


I have a dragon program that I have inherited and trying to expand.

I have a two byte long string in a string called a PS.

PS1 byte is 0x01, second is 0x20, decimal value == 288

I am trying to get its value an integer, I used lines of the form

  x = int (pS [0: 2], 16) # Was a prostitute a while back and read [0: 3]  

More messages Valid: '\ x01'

Another C programmer and I have been googling and It is trying to work all day.

Suggestion, please

View the module. "H" for unsigned for signed 2-byte value

Use the.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -