app.py 文件源码

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

项目:sc-controller 作者: kozec 项目源码 文件源码
def do_command_line(self, cl):
        Gtk.Application.do_command_line(self, cl)
        if len(cl.get_arguments()) > 1:
            filename = " ".join(cl.get_arguments()[1:]) # 'cos fuck Gtk...
            from scc.gui.importexport.dialog import Dialog
            if Dialog.determine_type(filename) is not None:
                ied = Dialog(self)
                def i_told_you_to_quit(*a):
                    sys.exit(0)
                ied.window.connect('destroy', i_told_you_to_quit)
                ied.show(self.window)
                # Skip first screen and try to import this file
                ied.import_file(filename)
            else:
                sys.exit(1)
        else:
            self.activate()
        return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号