The podfile is for a osx 10.8 project. Here is the output from podfile install
1 2 3 |
|
The podfile is for a osx 10.8 project. Here is the output from podfile install
1 2 3 |
|
Added SSToolkit to my Podfile and got this message. Don’t know what it means…
1
|
|
1 2 3 4 5 6 |
|
Solution
1 2 3 |
|
So, today, when I want to write up a simple test to post data to a web server, I imported lib urllib2 right away.
It usually works great… until you need something more than basic.
Apparently I need to set some cookie and set to the server. Let’s import cookiejar and cookie…
Why it throws an exception AttributeError: ‘SimpleCookie’ object has no attribute +’rfc2965’?
OK, let’s import DefaultCookiePolicy. Then I got hit by a missing domain attribute exception. “Do I need to use a lower level Cookie class to set the domain?”, I wonder. Try switching to Cookie and it throw this exception
1 2 3 4 |
|
At this point I said to myself: No, I am not going to figure out the 17 arguments. My test code is at this point in this dismal state:.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
Instead of continuing banging my head against a wall, I recall reading about ‘requests’ module. Let give it a go.
Like magic, it is all I need. 2 lines.
1 2 |
|
It just works. Well done, requests!
Algorithms for Making Good Decisions by Kevin Leyton-Brown
The video was posted in 2011, but it is still very informative.
Kevin is also a contributor to the Game Theory course in coursera.org.
Presentation slide can be found here:
http://www.cs.ubc.ca/~kevinlb/talk.php?u=2011-Calumet-AlgorithmsDecisions.pdf