1import xlwt
2from tempfile import TemporaryFile
3book = xlwt.Workbook()
4sheet1 = book.add_sheet('sheet1')
5
6supersecretdata = [34,123,4,1234,12,34,12,41,234,123,3,56]
7
8for i,e in enumerate(supersecretdata):
9 sheet1.write(i,1,e)
10
11name = "random.xls"
12book.save(name)
13book.save(TemporaryFile())