I have a string print("hello")
. I want to directly store this as a .pyc file and execute it later. How can I do this?
How to convert a string into a pyc file without using a py file?
740 views Asked by codingsplash At
1
I have a string print("hello")
. I want to directly store this as a .pyc file and execute it later. How can I do this?
Take a look at the py_compile.compile and its source code to see how it is done.