Page 1 of 1

Possible to convert python script into C/C++ Pi executable ?

Posted: Thu Aug 08, 2013 11:14 am
by mrpi64
Is it possible to convert python script into C/C++ Pi executable? I have heard of it, but want to know if it's true. Thankjs :D

Re: Possible to convert python script into C/C++ Pi executab

Posted: Thu Aug 08, 2013 11:16 am
by RaTTuS
not as such...
but if you know what you are doing then you can re-make it as c++
why do you want to convert it ?

Re: Possible to convert python script into C/C++ Pi executab

Posted: Thu Aug 08, 2013 11:17 am
by Joe Schmoe
Not that I am saying there is anything wrong with your request, but the obvious question is : Why?

What problem are you trying to solve?

Re: Possible to convert python script into C/C++ Pi executab

Posted: Fri Aug 09, 2013 10:16 am
by mrpi64
I was just wondering if I could convert one of my python scripts into C or C++ so that it would become faster, and no-one could see the code. And for me, it would be easier to write a program in python, and then convert it, instead of learning to write C/C++ . :D

Re: Possible to convert python script into C/C++ Pi executab

Posted: Fri Aug 09, 2013 1:27 pm
by tokyostormdrain
Never used it but this may be of help?

https://en.wikipedia.org/wiki/Shedskin

Re: Possible to convert python script into C/C++ Pi executab

Posted: Wed Aug 14, 2013 2:17 pm
by robquant
Cython (cython.org) also offers the possibility to compile pure python code to an executable. However to gain substantial speedups you need to provide types. And you will still depend on any python module you import in your code.

Re: Possible to convert python script into C/C++ Pi executab

Posted: Sat Aug 17, 2013 3:17 pm
by mrpi64
Ok thanks everyone.