I have an application that uses Flash for the GUI and Python for the core logic. This combination is awesome. Unfortunately my current approach only works on Windows, as it uses the wxPython comtyp开发者_如何学Ces library to embed the Flash ActiveX player. Every other aspect of the app is platform-agnostic, so I'm thinking there must be some way on Linux to have Python talk to Flash.
The SWF need not require AVM2/AS3, though ideally I could use the most current Flash player available. I am using wxPython (wxWidgets) and would prefer to keep using it. Worst case I could jerry-rig something that loads the SWF in a separate process and talks over a socket connection to the Python, but I see no simple way to have the Flash display inside my application's window rather than a player window with its own menus and decorations.
Any suggestions appreciated. I'm very open to hacking at a solution if there's reason to believe it will work :)
Flash Professional has support to Adobe Air, so you could use it as front-end, usually a flash project can be released as an AIR application without major changes to its code. The communication could be done using Native Process Api (see links bellow). Then you can run it on Mac, Win e Lin.
http://www.kirupa.com/forum/showthread.php?349728-Air2-NativeProcess-launching-Python-scripts. http://mykola.bilokonsky.net/2010/11/adobe-air-nativeprocess-and-python-introduction/
精彩评论