def postH5 ( host, token, filename ):
  
  # Creating the url
  url = 'http://{}/ocpca/{}/'.format( host, token )
  
  # Opening the url and verifying if it connects or else exit the program
  try:
    req = urllib2.Request ( url, open(filename).read() )
    response = urllib2.urlopen(req)
    print url 
  except urllib2.URLError, e:
    print "Failed URL {}, Error {}".format(url, e)
Post a HDF5 File
dataset/ETHPy150Open neurodata/ndstore/util/testRest.py/postH5