Menu

#Py_compile

1 post

Feed
1 of 1 post
0Read More

Compile only if .pyc is out-of-date?

Reddit r/learnpython·u/RomfordNavy·6 months ago
#vYTp3d7r
#compile#file#date#exec#py_compile

Is there some way I can compile a .py script into a .pyc but only if it is missing or out-of-date with the.py file? I am trying to compile the file if necessary and then run it from within Python, can exec() run a .pyc file?…

15s