f = open("test","wb") for i in xrange(100000): f.write("test adqwe\n")