#NEWLINE# def random_string( random_length = None ) : #NEWLINE# #INDENT# "\n    A generator for creating random string data of letters plus ' ' (whitespace)\n\n    :params random_length: how many characters of random string data. if not provided, will be between 1 - 30\n    :returns: String\n    " #NEWLINE# choices = ( string . letters + ' ' ) #NEWLINE# text = [ ] #NEWLINE# if ( not x ) : #NEWLINE# #INDENT# random_length = random . randint ( 1 , 30 ) #NEWLINE# #UNINDENT# for x in range ( random_length ) : #NEWLINE# #INDENT# text . append ( random . choice ( choices ) ) #NEWLINE# #UNINDENT# return '' . join ( text )