And I meant: outfile = file("out.txt", 'w') I warned you the code might not be perfect! -------------------------------------------------- Blake T. Garretson http://blakeg.freeshell.org