6 ответов
+ 1
Yes you can compile python file using pycompile, you can also convert your file to .exe.
EDIT: here is a link:
https://m.youtube.com/watch?v=lOIJIk_maO4
+ 2
i think, to prevent software piracy.
its pretty much a problem in many interpreted language. now that i think about it, its kinda rare to see python based application being sold
+ 1
How to compile .py file?
Python doesn't compile the code, it interpret it, it doesn't make exe file.
The .py will remain .py in runtime.
+ 1
Exactly, why compile it at all ? You can write a very simple executable file for windows and linux to execute the .py file without compiling the file itself.
0
You'll have to compile it or convert it to .exe if you're on windows.
EDIT:
I think a better way is to keep the file as it is(so that you can modify it whenever you want to), and make a separate executable file to execute python script.
0
yes its possible i think its called pyinstaller or px_freeze (im not sure). its cx_freeze not px_freeze i just look it up
but its kinda beat the crossplatform concept, since exe only able to run natively in windows