Thanks a lot and I will take a look Cython, On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel <stefan...@behnel.de> wrote:
> Jason Qian via Python-list schrieb am 04.02.2018 um 17:52: > > This is the case of calling python from c and the python function > will > > return a string. > > Hi Jason, > > I noticed that you ran into a couple of problems using the C-API, so I > suggest looking into Cython instead. It basically translates Python to C > and supports optional static usage of C and C++ data types, so you get all > the native code interaction *and* all the Python interaction and features, > without having to go through the hassle of learning how the Python > internals work (and why they don't work for you). The code it generates is > probably also faster and safer than what you are currently writing (no > offence, just experience from reading and writing a lot of such code). > > http://cython.org/ > > Stefan > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list