python fun

So you’re writing a system that runs through xml files huh?

And does it dynamically each time you load the page.

Sounds like you should do some load testing.

Well heres a lovely baby small python script that helps you do just that. It makes 10,000 files for you. Oh so pretty.

s= """
---the test data---
"""
for i in range(0,10000):
f = open ("%d-%d.xml"%(i,i),'w')
f.write(s)
f.flush()
f.close()

(and if your interested the system passed – 2 seconds to run through 10000 files isn’t bad)

best pals

Leave a Comment