def Save_As(self, app, pad):
"""
saves the contents in pad to file
to specified filename
"""
save_file = asksaveasfilename(parent=app)
data = pad.get('1.0', GUI.END)[:-1]
f = open(save_file, 'w')
f.write(data)
f.close()
x = save_file
if platform.system() == 'Windows':
x = x.replace('/', '\\')
File.filename(map(str, x.split('\\'))[-1])
else:
pass
File.filepath(x)
app.title(File.name)
评论列表
文章目录