I'm a total Python lover for around 4-5 years. You have showed me now some interesting stuff that I didn't know about.
While I only skimmed over most parts of your article, I immediately stopped at the "nuitka" part. Because I used nuitka some years ago and really liked it. Interesting now that you are a big fan of it.
Do you really use it for shipping end user apps? Because I've actually never dealt with packaging for end users, I just have always needed scripts for myself till now. But if nuitka is really a good way to ship end user projects, then actually I already know how to do packaging if I'll need it one day. Did you never had problems with nuitka? Just curious now.
And is nuitka really only able to use Python 3.1 and nothing newer? Wasn't aware of that. Might be also problematic if you use newer Python syntax. Why isn't it supporting newer Python versions?
BIG EDIT:
Sorry you meant Python 3.11, I was reading that like Python 3.1.1 lol. Well, it's a bit late, must take some sleep soon 🙂 Happy to see that nuitka is totally up-to-date concerning Python versions.
Nuitka deals with any version between 2.6 and 3.11.
Never a single problem with it, it's great for giving your program to an end user: they don't need to install Python, or them it's a black box.
However, it doesn't package things, it just makes a stand alone executable. You usually want some package around that, deb/rpm for linux, exe/msi installer for windows or .pkg for mac, and nuitka doesn't provide that.
You can get away with just zipping the whole thing for technical user, but when you can't, it's a lot of work to package the thing.
May I ask you additionally: If you needed to do real packaging as you have described above, would you also use nuitka as a starter to work with? Or would you completely go another way?
I can remember that when using nuitka, I thought it was pretty nice and convenient to have a standalone executable. Though the actual use case for me was trying to speed up execution time of a script.
I've just realized that you are the writer where I commented on another article about a week ago. Wasn't aware of that when writing the above comment, but have seen your name now, thus I remembered. I came here through the PyCoder's weekly newsletter. Was also the way I landed here last week. They seem to like your articles, too. Which I can totally understand 🙂
Transcrypt is actually a Python to JavaScript transpiler. It uses the Python AST module under the hood during the transpile process. So not only is it not just "Python-like", the Python code it processes *has* to be syntax correct Python for it to even work. The end result is JS code that can run natively in a web browser that only needs an additional 70K JS file at run time. It is intended to allow Python developers to utilize the JS ecosystem. I personally use it to develop React/MUI applications with Python.
The main difference between Brython/Skulpt and Transcrypt, is that Transcrypt has an ahead-of-time compile step whereas the others transpile in the browser on page load or at run time.
Thanks for that very interesting article!
I'm a total Python lover for around 4-5 years. You have showed me now some interesting stuff that I didn't know about.
While I only skimmed over most parts of your article, I immediately stopped at the "nuitka" part. Because I used nuitka some years ago and really liked it. Interesting now that you are a big fan of it.
Do you really use it for shipping end user apps? Because I've actually never dealt with packaging for end users, I just have always needed scripts for myself till now. But if nuitka is really a good way to ship end user projects, then actually I already know how to do packaging if I'll need it one day. Did you never had problems with nuitka? Just curious now.
And is nuitka really only able to use Python 3.1 and nothing newer? Wasn't aware of that. Might be also problematic if you use newer Python syntax. Why isn't it supporting newer Python versions?
BIG EDIT:
Sorry you meant Python 3.11, I was reading that like Python 3.1.1 lol. Well, it's a bit late, must take some sleep soon 🙂 Happy to see that nuitka is totally up-to-date concerning Python versions.
Cheers!
Nuitka deals with any version between 2.6 and 3.11.
Never a single problem with it, it's great for giving your program to an end user: they don't need to install Python, or them it's a black box.
However, it doesn't package things, it just makes a stand alone executable. You usually want some package around that, deb/rpm for linux, exe/msi installer for windows or .pkg for mac, and nuitka doesn't provide that.
You can get away with just zipping the whole thing for technical user, but when you can't, it's a lot of work to package the thing.
May I ask you additionally: If you needed to do real packaging as you have described above, would you also use nuitka as a starter to work with? Or would you completely go another way?
Yes, nuitka for the compilation, then a dedicated tool for packaging, like nsis for windows.
Ok thanks! Good to know that I'm already well equipped for half of the packaging way through nuitka.
Yes, but only end user packaging. Not libs. And deployment is a special case.
Thanks for your in depth answer!
I can remember that when using nuitka, I thought it was pretty nice and convenient to have a standalone executable. Though the actual use case for me was trying to speed up execution time of a script.
I've just realized that you are the writer where I commented on another article about a week ago. Wasn't aware of that when writing the above comment, but have seen your name now, thus I remembered. I came here through the PyCoder's weekly newsletter. Was also the way I landed here last week. They seem to like your articles, too. Which I can totally understand 🙂
Thanks again!
Transcrypt is actually a Python to JavaScript transpiler. It uses the Python AST module under the hood during the transpile process. So not only is it not just "Python-like", the Python code it processes *has* to be syntax correct Python for it to even work. The end result is JS code that can run natively in a web browser that only needs an additional 70K JS file at run time. It is intended to allow Python developers to utilize the JS ecosystem. I personally use it to develop React/MUI applications with Python.
The main difference between Brython/Skulpt and Transcrypt, is that Transcrypt has an ahead-of-time compile step whereas the others transpile in the browser on page load or at run time.
Good point, I misrepresented the project. Let me edit the article.
Hey, just a heads-up that you typoed Nuitka 4 of the 5 times it’s mentioned in the article! 😄
(It should be Nuitka instead of Nuikta.)
I always do this typo. Even the command, I have an alias for it because I can't get it right !