Hi Eugen,
There is a bunch of tools like cython which are simply code generators (py
-> c, a quick google search should give you a good list of them).

Imho, cython leads to ugly and unreadable python-like code and breaks the
ideas and concepts behind the language.
(there is a big bunch of devs behind the py core, and each design decision
takes long talks and many implementations before being incorporated in the
public release).
Then, the c code generated by cython is unreadable and produces usually
bigger binaries (example of a cython "hello world" generating hundreds
lines of code where in a regular cpy extension, it could be a dozen).
I also heard about lot of memory related problems. Maybe fixed now ?

If you are looking for speed, I would recommend writing your modules
directly in C using the C Python API which is kinda smart and convenient.
(before being a language, python is a c library which is damn useful:
unicode support, data-structures implementations, etc).
If you don't want to bother with C, you can still use the 'ctypes' packages
which will let you code in python and keeping a bridge to the C world for
specific speed purposes.

In a pure performances topic on processing softimage world datas, I
observed:
c dlls called by ctypes <= c extensions using cpython <=  cython <= pure
ctypes.
< Im sure this scale depends of the context and the implementations. >

** prototyping ops in cython using the si python binding ? writing qt
widgets in cython using pyqt ?
In the way I understand it, no, it should not be possible (or maybe with a
huge amount of work and time to get everything working).

A python binding can be tough to produce and usually deals/answers to
specific needs/cases of the target API. That's why, I would tend to prefer
pybindings provided by Qt or Softimage instead of solution like this.
If there is no available binding (which is kinda rare cases), or when I
need speed improvements, I'm choosing, pure c/cpp implementation bind with
'ctypes' or c python extensions.

Finally, I would say, in a prototyping context, there is definitively no
point to use something else than pure python and official bindings, then
reimplementing the code in c/cpp.

Anyway, hope this general feedback will be valuable to you,
jo


2012/4/17 Eugen Sares <softim...@keyvis.at>

> without

Reply via email to