#NEWLINE# def generate_id( self , number_of_chars = 16 ) : #NEWLINE# #INDENT# bits = random . getrandbits ( ( 6 * number_of_chars ) ) #NEWLINE# id = '' #NEWLINE# for _ in xrange ( number_of_chars ) : #NEWLINE# #INDENT# id += self . alphabet [ ( bits % 64 ) ] #NEWLINE# bits /= 64 #NEWLINE# #UNINDENT# return self