def _encoded_cookies(cookies):
 cookie_encoder = SimpleCookie()
 for (k, v) in cookies.items():
  cookie_encoder[k] = v
 return cookie_encoder.output(header='', sep=';').encode('ascii')

def _encoded_cookies ( cookies ) : cookie_encoder = SimpleCookie ( ) for ( k , v ) in cookies . items ( ) : cookie_encoder [ k ] = v return cookie_encoder . output ( header = '' , sep = ';' ) . encode ( 'ascii' )
encode dict of cookies to ascii string .