*** /apps/pydev/lib/python2.3/distutils/file_util.py.ORIG Tue Oct 31 15:26:01 2006 --- /apps/pydev/lib/python2.3/distutils/file_util.py Tue Oct 31 15:26:30 2006 *************** *** 243,253 **** # move_file () ! def write_file (filename, contents): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ ! f = open(filename, "w") ! for line in contents: ! f.write(line + "\n") ! f.close() --- 243,259 ---- # move_file () ! def write_file (filename, contents, verbose=0, dry_run=0): """Create a file with the specified name and write 'contents' (a sequence of strings without line terminators) to it. """ ! if dry_run: ! if verbose: ! f = sys.stdout ! for line in contents: ! f.write(line + "\n") ! else: ! f = open(filename, "w") ! for line in contents: ! f.write(line + "\n") ! f.close()