Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
String to hexadecimal conversion
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Praveena P, post: 3627188"] Hi folks, I am new to Python... so am not too sure about how the type conversion works. I have to read a file that contains hexadecimal data and use the data further to do some arithmetic calculations. A sample of the input is : 00000000000020E0000032F800000000400022005E The problem I am facing is this: I am using f.read(2) to read a byte at a time, but the data that is read is a string rather than a number. So it kind of hampers any arithmetic operations I perform on this data... Could you please suggest some method I could use for this? Thanks guys! Praveena [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
String to hexadecimal conversion
Top