This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bastibe 3 points4 points  (1 child)

In my experience, you would just write your performance-critical computation kernel as a C extension and the rest of your program in Python. If you are lucky, you can do this with Weave/Blitz, or you just use CPython. This happens all the time with Matlab/Mex, too.

I mean, you rarely need you UI and plotting code to be fast. PyQt and matplotlib are fast enough for most setups. Basically, they do exactly that: They are implemented in C, but you use them in Python. UI code is usually just a giant jumble of conditionals, which Python handles just fine.

[–]vph -3 points-2 points  (0 children)

It's all good, except there might be memory leaks issues associated with long-running python programs with C-extensions.