How to permanently remove __import__?

Peter Hansen peter at engcorp.com
Wed Jun 18 11:07:47 EDT 2003


martin z wrote:
> 
> So, I need to disable access to the standard filesystem.  I see two options
> on how to do this: disable/override
> all of the built-in functions that access the filesystem (the imp module,
> open, etc) or somehow get rid of the
> filesystem "under the hood".

Wow, sounds neat.  Have you considered a custom Python interpreter,
or does this have to run on other people's existing installations
of Python?

If you do the custom interpreter you might be able to make fewer
changes, and be confident of much greater security, than if you
try to put all the restrictions in from a higher level.  Just a
thought...

-Peter




More information about the Python-list mailing list