from sys import argv
script,filename = agrv
print " were going to erase %r." % filename
print " if you dont want that, hit ctrl-c ^C. "
print " if you do want that, hit return."
raw_input("?")
print "opening the file.."
target = open (filename, 'w')
print " truncating the file. good bye "
target.truncate()
print " now im going to ask you for three lines"
line1 = raw_input ("line 1: " )
line2 = raw_input ("line 2: " )
line3 = raw_input ("line 3: " )
print " im going to write to file"
target.write(line1)
target.write("\n")
target.write(line2)
target.write("\n")
target.write(line3)
target.write("\n")
print " and finaly we close it"
target.close()
ZnJvbSBzeXMgaW1wb3J0IGFyZ3YKCnNjcmlwdCxmaWxlbmFtZSA9IGFncnYKCnByaW50ICIgd2VyZSBnb2luZyB0byBlcmFzZSAlci4iICUgZmlsZW5hbWUKcHJpbnQgIiBpZiB5b3UgZG9udCB3YW50IHRoYXQsIGhpdCBjdHJsLWMgXkMuICIKcHJpbnQgIiBpZiB5b3UgZG8gd2FudCB0aGF0LCBoaXQgcmV0dXJuLiIKCnJhd19pbnB1dCgiPyIpCgpwcmludCAib3BlbmluZyB0aGUgZmlsZS4uIgp0YXJnZXQgPSBvcGVuIChmaWxlbmFtZSwgJ3cnKQoKcHJpbnQgIiB0cnVuY2F0aW5nIHRoZSBmaWxlLiBnb29kIGJ5ZSAiCnRhcmdldC50cnVuY2F0ZSgpCgpwcmludCAiIG5vdyBpbSBnb2luZyB0byBhc2sgeW91IGZvciB0aHJlZSBsaW5lcyIKCmxpbmUxID0gcmF3X2lucHV0ICgibGluZSAxOiAiICkKbGluZTIgPSByYXdfaW5wdXQgKCJsaW5lIDI6ICIgKQpsaW5lMyA9IHJhd19pbnB1dCAoImxpbmUgMzogIiApCgpwcmludCAiIGltIGdvaW5nIHRvIHdyaXRlIHRvIGZpbGUiCgp0YXJnZXQud3JpdGUobGluZTEpCnRhcmdldC53cml0ZSgiXG4iKQp0YXJnZXQud3JpdGUobGluZTIpCnRhcmdldC53cml0ZSgiXG4iKQp0YXJnZXQud3JpdGUobGluZTMpCnRhcmdldC53cml0ZSgiXG4iKQoKcHJpbnQgIiBhbmQgZmluYWx5IHdlIGNsb3NlIGl0Igp0YXJnZXQuY2xvc2UoKQogICAgICAgICAgICAgCgogICAgCg==