#NEWLINE# def packed_str( self , string ) : #NEWLINE# #INDENT# 'Take a little endian binary string, and convert it to a python int.' #NEWLINE# return sum ( [ ( int ( string [ string ] ) * ( 2 ** idx ) ) for idx in xrange ( len ( string ) ) ] )