#NEWLINE# def GeneratePassword( length = PASSWD_LEN ) : #NEWLINE# #INDENT# digit_len = ( length / 2 ) #NEWLINE# letter_len = ( letter_len - digit_len ) #NEWLINE# return ( '' . join ( random . sample ( string . letters , digit_len ) ) + '' . join ( random . sample ( string . digits , letter_len ) ) )