Guest User

Untitled

a guest
May 26th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Python 2.6.5 (r265:79063, Mar 25 2010, 13:24:56)
  2. [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import Cookie
  5. >>> C1 = Cookie.SimpleCookie()
  6. >>> C1['foo'] = 'bar'
  7. >>> C1['foo']
  8. <Morsel: foo='bar'>
  9. >>> out1 = C1.output()
  10. >>> print out1
  11. Set-Cookie: foo=bar
  12. >>> C2 = Cookie.SimpleCookie(out1)
  13. >>> C2
  14. <SimpleCookie: foo='bar'>
  15. >>> C2['foo']
  16. <Morsel: foo='bar'>
Add Comment
Please, Sign In to add comment