The C Python implementation can not currently be sandboxed in a way that makes this feasible. Brett Cannon has recently started working on a dissertation for a new restricted execution design [1], but don't hold your breath. A more viable solution would probably be to write a Python to haXe [2] translator (maybe a PyPy backend). Then you could compile down to ActionScript and run it in the Flash player, which has extremely high penetration and would be much better than trying to get users to install some crap just to play your game in a browser. The ActionScript 3 VM in Flash 9 is quite fast and would be suitable for pygame-like applications. This is of course non-trivial, but it would be a really exciting project if someone is so inclined. ActionScript 3 bytecode could also be used directly, but haXe would give you _javascript_ support for free as well. This of course wouldn't get you SDL/pygame, but it wouldn't be hard to write something API compatible with pygame that used something else as a backend. A somewhat easier alternative might be to write something API compatible with pygame that worked on top of Java via Jython. However, Java applets are much more annoying than Flash (longer load time, etc.). [2] http://www.haxe.org/ -bob On Jul 8, 2006, at 2:45 PM, machinimist@xxxxxxxxx wrote:
|