def cookie_app(environ, start_response):
 response = Response(environ.get('HTTP_COOKIE', 'No Cookie'), mimetype='text/plain')
 response.set_cookie('test', 'test')
 return response(environ, start_response)

def cookie_app ( environ , start_response ) : response = Response ( environ . get ( 'HTTP_COOKIE' , 'No Cookie' ) , mimetype = 'text/plain' ) response . set_cookie ( 'test' , 'test' ) return response ( environ , start_response )
a wsgi application which sets a cookie .