Python is a versatile and easy-to-learn programming language. As such, developers are keen to use it as a "mini-programming language" for users to write custom code that will run within an application's sandbox. The usual idea is to do the following:
- read the user's custom code;
- verify that the code is safe to execute (i.e. sandbox it)
exec()
the verifed safe code.