ge_player.py 文件源码

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

项目:griffith 作者: Strit 项目源码 文件源码
def toolbar_icon_clicked(self, widget, movie):
        if not movie or not movie.trailer:
            return False

        use_shell = True
        command = self.get_config_value('command', self.preferences['command']['default'])
        if is_windows_system():
            use_shell = False # Popen with shell=True doesn't work under windows with spaces in filenames
            if not command:
                import win32api
                log.debug('try ShellExecute with trailer %s' % movie.trailer)
                win32api.ShellExecute(0, None, movie.trailer, None, None, 0)
                return

        if '{1}' in command:
            command = command.replace('{1}', movie.trailer)
        else:
            # make a sequence results in Popen calls list2cmdline
            command = [command, movie.trailer]

        log.debug(command)
        Popen(command, shell=use_shell)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号