Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.6.5 (r265:79063, Mar 25 2010, 13:24:56)
- [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import Cookie
- >>> C1 = Cookie.SimpleCookie()
- >>> C1['foo'] = 'bar'
- >>> C1['foo']
- <Morsel: foo='bar'>
- >>> out1 = C1.output()
- >>> print out1
- Set-Cookie: foo=bar
- >>> C2 = Cookie.SimpleCookie(out1)
- >>> C2
- <SimpleCookie: foo='bar'>
- >>> C2['foo']
- <Morsel: foo='bar'>
Add Comment
Please, Sign In to add comment