Permalink
Browse files

Replace external 'requests' lib with urllib

Slightly less tidy code, but means no external dependencies.
  • Loading branch information...
1 parent 17fd566 commit e10c3bcf4a6abeace0ba9a27aaa63d5a99005500 @dbr dbr committed Aug 28, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 examples/loading.py
View
@@ -1,7 +1,7 @@
import os
import sys
-import requests
+import urllib
from random import randint
from time import sleep
@@ -51,7 +51,8 @@ def next_frame(index=0, offset=0, reverse=False,
"terminal": terminal
}
- return requests.get(BASE_URL, params=payload).text
+ params = urllib.urlencode(payload)
+ return urllib.urlopen(BASE_URL + "?" + params).read()
class ProgressBar:

0 comments on commit e10c3bc

Please sign in to comment.