# _*_ coding:utf-8 _*_

from os.path import exists

# 打印之前所有的内容
if exists("tempfile.txt"):
	print '''
记事本现在的内容是：
-------------------------------------------'''
	txt = open("tempfile.txt")
	notelist = txt.readlines()
	txt.close()
	for i in notelist:
		print(i)
	print "-------------------------------------------"

# 输入新的内容
txt = open("tempfile.txt", 'a')
newline = raw_input("请给记事本输入新内容： ")
txt.write(newline)
txt.write("\n")
txt.close()

# 新内容另存为文件
filename = raw_input("新内容的文件名是：")
output = open(filename + ".txt", 'w')
output.write(newline)
output = open(filename + ".txt")
output.close

@@ -46,16 +46,29 @@
  exists%0D
+%0Aimport time%0D
 %0A%0D%0A# %E6%89%93%E5%8D%B0%E4%B9%8B
@@ -412,24 +412,76 @@
 %E6%9C%AC%E8%BE%93%E5%85%A5%E6%96%B0%E5%86%85%E5%AE%B9%EF%BC%9A %22)%0D%0A
+txt.write(time.strftime(%22%25d/%25m/%25Y %25H:%25M:%25S%22+%22%5Cn%22))%0D%0A
 txt.write(ne
@@ -606,16 +606,109 @@
 , 'w')%0D%0A
+output.write(filename + %22.txt%22+%22%5Cn%22)%0D%0Aoutput.write(time.strftime(%22%25d/%25m/%25Y %25H:%25M:%25S%22+%22%5Cn%22))%0D%0A
 output.w

Update main.py