def printable_name(string, code_style=False):
 if (code_style and ('_' in string)):
  string = string.replace('_', ' ')
 parts = string.split()
 if (code_style and (len(parts) == 1) and (not (string.isalpha() and string.islower()))):
  parts = _split_camel_case(parts[0])
 return ' '.join(((part[0].upper() + part[1:]) for part in parts))

def printable_name ( string , code_style = False ) : if ( code_style and ( '_' in string ) ) : string = string . replace ( '_' , ' ' ) parts = string . split ( ) if ( code_style and ( len ( parts ) == 1 ) and ( not ( string . isalpha ( ) and string . islower ( ) ) ) ) : parts = _split_camel_case ( parts [ 0 ] ) return ' ' . join ( ( ( part [ 0 ] . upper ( ) + part [ 1 : ] ) for part in parts ) )
generates and returns printable name from the given string .