如何使用模块从另一个PY文件中编译PY文件? (因此不是CMD)

发布于 2025-01-27 07:41:55 字数 407 浏览 3 评论 0原文

我想制作一个代码(我将调用 compiler.py ),它将在不使用CMD命令的情况下编译我需要的任何PY文件我的编译器在其他 设备)。

以下是一些代码的示例,可以说明我的要求: 这是compiler.py的样子: compiler.py.py

这是RandomProgramm.py: RandomProgramm.py

关于如何进行的任何想法?

I want to make a code (that I'll call compiler.py), that'll compile any py file I need without using cmd commands, only modules(Things that are compilable So I can still Use my compiler on other
devices).

Here are some examples of code to illustrate what I am asking for:
Here is how compiler.py would look like :
compiler.py

And this is randomprogramm.py :
randomprogramm.py

Any Idea on how to proceed ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文