[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame web plugin



Im still a bit at a loss as to where the blocking problem is...

if I was to sandbox cpython for a pygame heres what Id try.

- replace builtins like import, compile, exec, reload  through the C
api (as with the blender3d example I posted earlier, scripters will
need to write scripts accounting for this perhaps in one py file to
start with.
- try to replace pythons memory allocator with one that can be
limited.. OR, patch python to limit the memory it can use. (web plugin
could statically link the patched python) OR use process some OS
control to limit memory management.

What else would you need to do to sandbox python for a web plugin?

On Sun, Sep 7, 2008 at 12:36 PM, Noah Kantrowitz <noah@xxxxxxxxxxxxxx> wrote:
> On Sep 6, 2008, at 6:21 PM, Greg Ewing wrote:
>
>> J Dunford wrote:
>>
>>> In my experience, the general consensus with sandboxing python is - don't
>>> try it.
>
> If you think Python sandboxing is easy, you don't understand the problem.
> Most of the current Python sandboxing concepts use alternate interpreters,
> IronPython and Jython have already been mentioned, but there is also an
> ActionScript (flash) target for PyPy and Phil's TinyPy. The most promising
> for Pygame on the web are the flash backend to PyPy and porting Pygame to
> Jython/Java applet graphics APIs. I remember hearing good things about the
> first one at Pycon, that they had ported enough to run the Punch A Monkey
> example in Fx.
>
> --Noah
>