[Python-ideas] Re: Restricting Python

2020-07-19 Thread Alex Hall
I'm making [a platform for learning Python]( https://github.com/alexmojaki/futurecoder) which needs to allow users to run arbitrary Python code on the server. Each user gets their own process and I use `import resource; resource.setrlimit(resource.RLIMIT_NOFILE, (0, 0))` to prevent opening any file

[Python-ideas] Re: Restricting Python

2020-07-19 Thread Michael Smith
Hi, Robert, I learned about an existing RestrictedPython implementation through Zope/Plone. I can see that it differs from your ideas in some ways, but I think at heart it gets to what you're trying to solve for. Have you read about it? https://restrictedpython.readthedocs.io/en/latest/idea.html

[Python-ideas] Re: Restricting Python

2020-07-19 Thread Chris Angelico
On Mon, Jul 20, 2020 at 2:14 AM Robert wrote: > > > Hi, I’ve been lurking for a while. This is my first real post in a long > time. > > > This is a proposal for a system-less python; that is, a version of > python that does not have file or other inappropriate access to the os. > The idea is to p