Extending Python

J

Johannes

I am thinking of replacing Lua as internal script controller and I know how
to extend/embed python but is
there a way of limiting what functionality can be actually be accessible to
the user, f.e. I don't want the script to be able
to read/write files?

/Johannes
 
T

Terry Reedy

Johannes said:
I am thinking of replacing Lua as internal script controller and I know
how to extend/embed python but is
there a way of limiting what functionality can be actually be accessible
to the user, f.e. I don't want the script to be able
to read/write files?

There have been various threads on script security (see Google).

Summary: you can do various things to enhance security, such as replacing
builtins (like file() and open()), but, especially with new-style classes
and associated features, there is no known way to absolutely control
access. Besides which, 'while True: pass', in all its guises, is also hard
to stop.

Terry J. Reedy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top