import question

Grant Edwards grant.b.edwards at gmail.com
Thu Nov 18 20:59:29 EST 2021


On 2021-11-17, lucas <sjlukacs at gmail.com> wrote:

> are there any other ways to import a module or package other then
> the "import" or "from...import..." statements?  i ask because i'm
> allowing programming on my web2py website and i don't want any
> accessing packages like os or sys.

Safely allowing people to enter/upload and then execute Python code is
very difficult. From my brief research into that question a little
while (a year or two) ago, the answer was that can't really be done in
any general way. IIRC, some promising work was done in PyPy to address
this problem, but the sandbox stuff never got moved to Py3?

--
Grant


More information about the Python-list mailing list