Flask server: proof of concept

Use urllib2 instead of pycurl
Fix a python2 import error