Had this sitting around on my computer. It sets and gets a cookie. I wrote it a couple years ago to test a bug with pyjamas where the path wasn't being escaped. I cleaned it up a little & tested it with the latest pyjs code and it works. Feel free to let me know if I should change anything.
add cookies example
neat :) LGTM, thanks much Charles.