Re: [PyInstaller] Re: Python/C API project - compile to exe

2020-07-28 Thread Maciej Trzuskowski
> > At this point you’ve done the opposite of what most folks do— written the > non-computationally intensive GUI in C++, and the computational bits in > Python :-) > Yeah, after answers and thinking about it, I know that maybe it's a little weird. :) Because I need to finish my project quick

Re: [PyInstaller] Re: Python/C API project - compile to exe

2020-07-27 Thread 'Chris Barker - NOAA Federal' via PyInstaller
Thanks for all the answers. I think I got a lesson for the future, to firstly check if something is possible and then do it. :) I'll check nuitka and shedskin, Also Cython — it can be used in “embedded” mode as well. https://cython.readthedocs.io/en/latest/src/tutorial/embedding.html but I wo

Re: [PyInstaller] Re: Python/C API project - compile to exe

2020-07-27 Thread Maciej Trzuskowski
Thanks for all the answers. I think I got a lesson for the future, to firstly check if something is possible and then do it. :) I'll check nuitka and shedskin, but I wonder if it will not be easier to rewrite python functions to c++ and stay with c++ only. -- You received this message because

Re: [PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread 'legorooj' via PyInstaller
Actually their program uses "Python.h", which means it doesn't require any DLL dependencies. With our bootloaders we load the functions from the DLL because it means the same bootloader works for multiple versions of python. Legorooj Original Message On Jul 23, 2020, 23:35, bw

[PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread 进陆
I think you are talking about http://nuitka.net/ and https://github.com/shedskin/shedskin -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller+unsubscr...

Re: [PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread 'Chris Barker' via PyInstaller
I don't think you want PyInstaller here. In fact, what you are doing is simply writing a C++ application, Python, in this case, is being used as a C library. So what you need to do is bundle up your app like any C++ app, that is to say: * It has to be linked to the Python libs * It has to have ac

[PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread Maciej Trzuskowski
Ok, I've done it. Now my folder "dist/PythonApplication1" looks like this: ->Many folder ->Many files ->PythonApplication1.exe ->cppFile.exe ->PythonApplication1.py When I launch "cppFile.exe" I get the same result as in visual studio: 4 prints. When I launch "PythonApplication1.exe" I get 1 prin

[PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread bwoodsend
Ahh your embedding Python into C++. I’ve never done that so I probably can’t help much. I imagine your C++ program needs to be able to find python3.dll and all its dependents so it needs to be in either your PATH or your current working directory. And it will also need PythonApplication1.py t

[PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread Maciej Trzuskowski
To simplify my problem, I made a small project showing my use of python and c++. Without any ui, any wxWidgets, any file operations. Only simple console application executed python script. Here it is: *cppFile.cpp* #include #include int main() { PyObject *pModule, *pClass, *pA

[PyInstaller] Re: Python/C API project - compile to exe

2020-07-23 Thread bwoodsend
Certainly it's possible. I'm not entirely sure what your doing. Normally when we glue C++ to Python we compile the C++ to either dll/so and load via ctypes or to pyd and import directly but you seem to be saying you've compiled your C++ to an exe? In which case I take it your using subprocess i