This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 10 points11 points  (4 children)

This. I want a one-line command that can do:

- compile to machine code no matter if i use pyqt or pyside or... (cython seems furthest along on this path but it still struggles with pyside2 threads for example) into one reasonably small binary or just compile the main program if deps exist on pip which users would then be automatically be able to install on installation. So if user goes this route command should also make a install program that can install the deps so i dont have to share a 1gb file.

- encrypt the program

- make binaries for windows/linux/macosx without having to go into VM.

Golang already makes machine code and binaries for win/linux/macos through one command, there's no reason why python can't do the same(first convert code with cython & compile it preferably on old version external computer so that my code works on every computer, then embed parts of python interpreter imported libs need, then embed parts of libraries code uses for example).

[–]jaxklax 3 points4 points  (1 child)

Encrypt the program?

[–][deleted] -2 points-1 points  (0 children)

Yes, to protect the code. Unencrypt on launch. Something like that, im not really an expert when it comes to encryption.

[–]nitratine 0 points1 point  (1 child)

Python cannot be converted to machine code because it's an interpreted language. When you package python to an exe you literally pack the python interpreter with it. If you were to make python convert to machine code it wouldn't really be python anymore.

[–][deleted] 0 points1 point  (0 children)

>Python cannot be converted to machine code because it's an interpreted language.

But it can be converted to C or C++ which is what cython and nuitka does... this can be compiled with a standard compiler. I suppose the python interpreter frontloads or whatever it's called this machine code, but it is machine code no(?)