#NEWLINE# def PackDEV_BROADCAST( devicetype , rest_fmt , rest_data , extra_data = '' ) : #NEWLINE# #INDENT# extra_data += ( '\x00' * ( 4 - ( len ( extra_data ) % 4 ) ) ) #NEWLINE# format = ( 'iii' + rest_fmt ) #NEWLINE# full_size = ( struct . calcsize ( format ) + len ( extra_data ) ) #NEWLINE# data = ( ( full_size , devicetype , 0 ) + rest_data ) #NEWLINE# return ( struct . pack ( format , * data ) + extra_data )