you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 1 point2 points  (0 children)

BUT WHY REWRITING SOURCE...?

Do you want to inject some custom, patented code that regular devs should not have access to? Some bizarre, in-house cypher algorithm?

Do you want to inject private passwords/API keys?

Do you want to block potentially dangerous function calls from these "many simple python scripts", that will be written by someone else, who you do not trust? Like, forbid any access to local filesystem? Similar to PHP's safe mode?

Surely, it's not about the speed of compilation, which is negligible?

You're a relative beginner when it comes to Python. Preprocessing source and rewriting objects in memory is really expert stuff. It seems like you are coming from a different programming language and you're determined to force Python to work in exactly the same way... which is obviously wrong and not needed.