def my_app(environ, start_response):
    session_cookie = SimpleCookie()
session_cookie['session'] = 'somedata'
session_cookie['session']['Path'] = '/'
headers = []
Set a cookie and retrieve it with Python and WSGI