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-25 2:56

What kind of a moron uses the coding style:
function( arg):

Go fuck yourself

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