Please, is there a 'python tool' of sorts (ide or whatever) that will convert Python code to 'C' code .
The closest thing would probably be Shed Skin that translates Python code to rather ugly C++ code. See:
A number of students have attempted a Python to C translator but failed because of the dynamic typing.
You need to do it manually , also it is not 100% compatible with C.
Python is a modern language that has borrowed advanced programming concepts from a number of other languages like C++, Java, Lisp and Haskell. It would be very hard to express these in C.
> that will convert Python code to 'C' code .
As already stated, replicating a lot of the "free" functionality using your own C code is going to take work.
Also, python (in common with many modern interpreted languages) is bytecode compiled before it is run. If your program runs for any length of time, then this 'hit' at the start is negligible. The "interpreter == slow" paradigm doesn't hold so much nowadays.
Besides, if you've made dumb (ie expensive) performance decisions in your python code, then it would make sense to address these before trying to translate (somewhat literally) into C (where it will still suck).
If you're still worried about performance, then consider this.
That is, focus on isolating the bit which really matters and write that in C, then wrap it up so you can call it from python.
There is a large body of literature available for embedding Python code in a C program. The official reference for embedding in C can be found at http://www.python.org/doc/current/c-api/. This may be of interest to you if you are looking to use Python code from a C program.
Hey, so I wanna ask how I need to create a method who will remove word if in that word is 2 same chars. Example: "Potato" in this word there is a 2 "o" chars so this word will need to be removed. "Forum" in this word there is no ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.
Private Sub btn_addline_Click(ByVal ...
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...