All pastes #390946 Raw Edit

Someone

public python v1 · immutable
·published 2007-03-11 20:07 UTC
rendered paste body
import os, sysls = os.linesepwhile True:    fname = raw_input("Name of the file you'd like to create? ")    if os.path.exists(fname): print "%s already exists" % fname    else: breakall = []print "\nEnter lines ('.' by itself to quit).\n"while True:    entry = raw_input(">> ")    if entry == '.': break    else: all.append(entry)if len(all) <= 0: sys.exit(1)FILE = open(fname, 'w')FILE.seek(0)FILE.writelines('%s' % [(x + ls) for x in all])FILE.close()print 'DONE.'