commands.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:NaiveCCompiler 作者: crisb-DUT 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号