f = open( "big.py", 'w' ) line = "value = u'%s'" % ('a'*100) for i in range( 5000 ): f.write( "%s\n" % line ) f.close()