Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.781 kb
# call run().
# Creates 168 lists on Streamsend.
import os
from interfaces.list import List
# Creates 168 lists on Streamsend. Returns their id numbers.
def run():
ids = []
for i in range(168):
name = "blast %d" % i
resp = List(name).create()
id = getId(resp)
print ("{%d:%s} " % (i, id)),
return ids
# Gets list id from httpresponse headers
def getId(httpresponse):
if httpresponse.status < 300 and httpresponse.status >= 200:
for header in httpresponse.getheaders():
if header[0] == 'location': location = header[1]; break
id = os.path.basename(location)
return id
if __name__ == '__main__':
ls = List('temp for Markham')
from lxml import etree
print etree.tostring(ls.root, pretty_print=True)
Jump to Line
Something went wrong with that request. Please try again.