def generatedFileWithStatements(): outfile = open(pathToMain + "\\statements.txt",'w') j=0 outfile.write("//This file was generated to test the size of main.scm that SannyBuilder can compile.\n") for i in range(0,70000): #outfile.write('0662: write_debug_message "Test %d"\n'%i) outfile.write('0004: $1515 = %d\n'%i) j+=1 if j>500: j=0 outfile.write('0001: wait 0 \n') outfile.close() generatedFileWithStatements()