Hacker News new | ask | show | jobs
by riskable 3573 days ago
Yes it does... One of the examples is monkey patching using bytecode. How are you going to do that without write access to the filesystem running your code?

The same is true for module imports... If you have write access to the same directory as the code itself there's all sorts of havoc one can cause beyond merely substituting your own os.py.

1 comments

You do not need access to the same directory as the code itself. Think of a Python program that can use plugins written by users. For example Django.