如何使用工具限制创建Python虚拟限制环境
我的问题很难理解,但我会尝试的。
我想以一种使用户能够以有限的方式编程的方式在我的一个应用程序中创建一个编程环境,以便无法执行我阻止的命令:我想防止创建文件,我如何在仍然能够与Python编程的同时防止这种情况?所有这些都必须在外部环境中完成。
让我重新提出这个问题, 我想创建一个软件虚拟环境,使用户能够以有限的方式在此环境中进行编程,因为我想防止程序员使用某些库并防止他使用某些命令,例如:
我想阻止开放()工具,因为用户无法使用它来创建文件,如果他试图使用该文件,则此虚拟环境应该告诉他他不能使用此工具。
My question will be hard to understand, but I will try.
I would like to create a programming environment in one of my applications, in a way that enables user to program in a limited way, so that it cannot execute commands that I prevent, for example: I want to prevent file creation, how do I prevent that while still being able to program with Python? All this must be done in an external environment.
Let me rephrase the question,
I want to create a software virtual environment that enables the user to program in this environment in a limited way, as I want to prevent the programmer from using some libraries and prevent him from using some commands, for example:
I want to block the open() tool, as user can't use it to create files, and if he tries to use it, this virtual environment should tell him that he can't use this tool.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论