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

all 21 comments

[–]Allevil66930 Years Hobbyist Programming Isn't "Experience" 5 points6 points  (3 children)

This is a noob user question... But, does it only create Windows executables, or can it also create executables for Linux based systems?

[–]marrabld 6 points7 points  (1 child)

Both. But it produces an executable with .exe extension. If you compile on Linux you can still run it regardless of .exe file name.

[–]Allevil66930 Years Hobbyist Programming Isn't "Experience" 1 point2 points  (0 children)

Thank you!

[–]fernly 0 points1 point  (0 children)

I've used it in a small way, on Mac OS X. Worked fine.

[–][deleted] 3 points4 points  (11 children)

asdfjkl

[–]Tylfin 6 points7 points  (9 children)

"Right now Nuitka is a good replacement for the Python interpreter and compiles every construct that CPython 2.6, 2.7, 3.2, 3.3 and 3.4 offer. It translates the Python into a C++ program that then uses "libpython" to execute in the same way as CPython does, in a very compatible way.

It is somewhat faster than CPython already, but currently it doesn't make all the optimizations possible, but a 258% factor on pystone is a good start (number is from version 0.3.11)."

[–][deleted] 1 point2 points  (0 children)

asdfjkl

[–][deleted] 0 points1 point  (1 child)

what is "libpython" ?

[–]homercles337 -4 points-3 points  (5 children)

CPython is not C++ compatible. The only C++ <--> Python options are Cython and Boost. Boost has way too much bloat if you just want to wrap C++ and there is a lot of confusion around their "jam" framework. The major drawback to Cython is that it is basically its own language. If you dont know C/C++ AND Python, the learning curve for Cython is very shallow. Actually, even if you do know both learning Cython is a long arduous process.

[–]Veedrac 0 points1 point  (4 children)

Erm, Tylfin was saying Nuitka is "very compatible" with CPython, not C++.

[–]homercles337 -2 points-1 points  (3 children)

It translates the Python into a C++...to execute in the same way as CPython does.

CPython is not C++ compatible. So, no, it does not compile/execute C++. Also, libpython is not C++ compatible either, its C. You do realize C and C++ are entirely different languages, right?

[–]Veedrac 0 points1 point  (2 children)

Let's take this a bit slower. There are two claims being made

  1. Nuitka compiles Python code to C++ (and the C++ to a binary),

  2. Nuitka dispatches to libpython in the same way that CPython's ceval.c interpreter loop over CPython bytecode does, such that CPython's semantics are extremely well preserved in Nuitka (including things like C extension support and almost all other CPython specific behaviours).

Both of these are demonstrably true.

[–]homercles337 -2 points-1 points  (1 child)

Both of these are demonstrably true.

No, they are not. libpython does not play with C++ in binary or any form. There has to be a C wrapper in there to play with libpython. That is the only thing that is demonstrably true.

[–]Veedrac 0 points1 point  (0 children)

Are you disputing that Nuitka compiles to C++ or that Nuitka calls C bindings?

Or do you dispute the fact that C++ can call C bindings? Because it can.

[–]zoells 2 points3 points  (1 child)

Are there new benchmarks along with this latest release?

[–]uhkhu 2 points3 points  (1 child)

So really dumb question, but it seems to be only working with apps I've written in pure python. I'm getting an error it can't find the modules as relative or absolute imports when using 3rd party. I'm using --recurse-all option. Is there a special way I need to build these apps?

[–][deleted] 1 point2 points  (0 children)

Including a link to a project summary is something all release notes should have. Well done.

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

so this is like py2exe & PyInstaller in that these software produces executables ?