Reply
Thread Tools
Posts: 95 | Thanked: 16 times | Joined on Feb 2008
#1
I was wondering if anyone has a method on embedding a swf file in a python window.
 
darethehair's Avatar
Posts: 273 | Thanked: 104 times | Joined on Mar 2007 @ Manitoba, Canada
#2
I would like to know the answer to that myself!

On a related note, I would like to know how to (easily) use 'gstreamer' to play videos within PyGame. I wanted to get answers to the 'flash' or 'gstreamer' problem for my tricorder simulator to allow playing video.
 
Posts: 334 | Thanked: 55 times | Joined on Aug 2007 @ Eastern Ontario, Canada
#3
Originally Posted by MerkurAlex View Post
I was wondering if anyone has a method on embedding a swf file in a python window.
Interesting idea.

Not sure what you mean by a Python Window, but I believe that you could use json-rpc or xml-rpc to communicate between a Flash client and a Python server resident on the tablet.

Making a little xml-rpc server or json-rpc server in Python is easy, and this article looks interesting:
http://www.mindtrove.info/articles/pyflash.html

Don't know if this is useful, maybe not.

Don.
 
Posts: 95 | Thanked: 16 times | Joined on Feb 2008
#4
well how about a gtk window how would you embed a flash file in it?
 
Posts: 334 | Thanked: 55 times | Joined on Aug 2007 @ Eastern Ontario, Canada
#5
Originally Posted by MerkurAlex View Post
well how about a gtk window how would you embed a flash file in it?
You could simply embed the Flash .swf in a minimal HTML page and use the browser as a container.

It would be portable and you would not have to wrestle with GTK or Scratchbox - the cost would be a slower start-up, the memory overhead for the browser and the cost of inter-process rpc calls instead of inline calls - which might be prohibitive for some applications.

I have been playing with a bit of Python to implement a combined XML-rpc server and application that when started causes the browser to fire up and display a supplied web-page that contains some Javascript that can make asynchronous calls to the Python back-end application through the embedded XML-rpc server.

I believe that I could just embed a Flash .swf file in the web-page being loaded and (if I knew enough ActionScript) get it to talk to a Python back-end using XML-rpc or json-rpc.

I have not spent much time on this yet, but it seems to work in principle, but there are loose ends that I need to sort out. It is not much code. Because everything is local there are no cross-scripting issues and my servers only respond to requests from 127.0.0.1. So, in my ignorance, I think it is as secure as any local app.
 

The Following User Says Thank You to dont For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:10.