Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字符串print("hello")。我想直接将其存储为 .pyc 文件并稍后执行。我怎样才能做到这一点?
print("hello")
查看py_compile.compile及其源代码,了解它是如何完成的。