def print_fw(iterable, joins=', ', prefix='', indent=0, width=79, trail=False):
 shift_width = 4
 preline = ('%s%s' % ((' ' * shift_width), prefix))
 linew = len(preline)
 sys.stdout.write(preline)
 for (i, entry) in enumerate(iterable):
  if ((not trail) and (i == (len(iterable) - 1))):
   sentry = str(entry)
  else:
   sentry = ('%s%s' % (str(entry), joins))
  if ((linew + len(sentry)) > width):
   sys.stdout.write(('\n%s' % preline))
   linew = len(preline)
  sys.stdout.write(sentry)
  linew += len(sentry)
 sys.stdout.write('\n')

def print_fw ( iterable , joins = ', ' , prefix = '' , indent = 0 , width = 79 , trail = False ) : shift_width = 4 preline = ( '%s%s' % ( ( ' ' * shift_width ) , prefix ) ) linew = len ( preline ) sys . stdout . write ( preline ) for ( i , entry ) in enumerate ( iterable ) : if ( ( not trail ) and ( i == ( len ( iterable ) - 1 ) ) ) : sentry = str ( entry ) else : sentry = ( '%s%s' % ( str ( entry ) , joins ) ) if ( ( linew + len ( sentry ) ) > width ) : sys . stdout . write ( ( '\n%s' % preline ) ) linew = len ( preline ) sys . stdout . write ( sentry ) linew += len ( sentry ) sys . stdout . write ( '\n' )
pprint an iterable .