Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Convert to Integer in Python

Name: Anonymous 2008-06-10 14:03


def readBMP( filename):
    f = file( filename)
    content = f.read()
    f.close()
    return content
   
def getDimensions( bytes):
    return bytes[18:22],bytes[22:26]

w,h = getDimensions( getBMP( 'test.bmp'))


how do i convert w and h to int?
atm (w,h) == ('\x05\x00\x00\x00', '\x05\x00\x00\x00')

Name: Anonymous 2012-05-26 12:22

>>25
The struct module is written in C, I don't understand your complaint.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List