Empty output file
<p>I have the following which, no matter what I have in the input file, gives me an empty file in the end, but I have no idea why, so I'd like to ask for your help if possible, thank you.</p>

<pre><code>    import re
    import sys
    import os

    if len(sys.argv) &gt; 1 :
         inf = sys.argv[1]
         if os.path.isfile(inf) :
             pass
         else :
              print "Nincs ilyen file!"
              sys.exit(0)
    else :
        print "Nincs argumentum!"

    infile = open(sys.argv[1],"r")
    outfile = open("out.txt","w")

    for t in infile :
         lista = t.split(";;;")
    for i in range(0,len(lista)):
         if lista[i] == "begin" :
              outfile.write("def "+lista[i-1]+"\n")
         elif lista[i] == "end;" :
              outfile.write(lista[i+1]+"\n")
         else :
              outfile.write("    "+lista[i]+"\n")
</code></pre>

<p>EDIT:</p>

<p>I have tried even just having it write something into the output file, but it still didn't do anything.</p>
