def hexadecimal(field):
 assert (hasattr(field, 'value') and hasattr(field, 'size'))
 size = field.size
 padding = (alignValue(size, 4) // 4)
 pattern = (u'0x%%0%ux' % padding)
 return (pattern % field.value)

def hexadecimal ( field ) : assert ( hasattr ( field , 'value' ) and hasattr ( field , 'size' ) ) size = field . size padding = ( alignValue ( size , 4 ) // 4 ) pattern = ( u'0x%%0%ux' % padding ) return ( pattern % field . value )
convert an integer to hexadecimal in lower case .