使用Python跨平台SWF播放?

时间:2021-07-17 02:15:55

I'm looking for different solutions to playing back SWF files on Windows, OSX and Linux using Python. Ideally I'd like to embed the player inside a wxPython frame/window.

我正在寻找使用Python在Windows,OSX和Linux上播放SWF文件的不同解决方案。理想情况下,我想将播放器嵌入到wxPython框架/窗口中。

One possibility I'm investigating is the Mozilla XPCOM framework since its used by FireFox to load the Flash plugin within the browser.

我正在研究的一种可能性是Mozilla XPCOM框架,因为它被FireFox用于在浏览器中加载Flash插件。

2 个解决方案

#1


Have you considered Adobe AIR?

你考虑过Adobe AIR吗?

Bruce Eckel said: Try combining the power of Python with the polish of Adobe Flash to create a desktop application.

Bruce Eckel说:尝试将Python的强大功能与Adobe Flash的优势结合起来,创建一个桌面应用程序。

#2


Though I don't know how to embed a browser within a wxPython window, the following code might serve in a pinch (and will work cross-platform, assuming you're working in Python 2.5 or above):

虽然我不知道如何在wxPython窗口中嵌入浏览器,但下面的代码可能会有用(并且可以跨平台工作,假设您使用的是Python 2.5或更高版本):

import webbrowser
webbrowser.open(your_swf_url)

It might be best to delegate this task to the browser anyway.

无论如何,最好将此任务委托给浏览器。

#1


Have you considered Adobe AIR?

你考虑过Adobe AIR吗?

Bruce Eckel said: Try combining the power of Python with the polish of Adobe Flash to create a desktop application.

Bruce Eckel说:尝试将Python的强大功能与Adobe Flash的优势结合起来,创建一个桌面应用程序。

#2


Though I don't know how to embed a browser within a wxPython window, the following code might serve in a pinch (and will work cross-platform, assuming you're working in Python 2.5 or above):

虽然我不知道如何在wxPython窗口中嵌入浏览器,但下面的代码可能会有用(并且可以跨平台工作,假设您使用的是Python 2.5或更高版本):

import webbrowser
webbrowser.open(your_swf_url)

It might be best to delegate this task to the browser anyway.

无论如何,最好将此任务委托给浏览器。