Python · Alternative Interpreters & Compilers

To call C's qsort from Cython you write from libc.stdlib cimport qsort. Why cimport instead of import, and what do you do when Cython has no ready-made header for the C library you need?

Answer locked. Get the free KnowCard app to reveal it — plus spaced-repetition review so it actually sticks.

Get it on App StoreGet it on Google Play

This is one card from the KnowCard library — thousands more across SAP, Linux, Python and more. In the app you get the answer, AI explanations, and cards that come back right before you would forget them. Free to start on iOS, Android or the web.

More in Alternative Interpreters & Compilers

When someone says "Python," which implementation do they almost always mean, and what does that implementation actually produce from your source?
A coworker says "Python is compiled — that's what the .pyc files in __pycache__ are: machine code." What's wrong?
What makes PyPy faster than CPython on the right workload, and what is the mechanism called?
You swap CPython for PyPy on a script that mostly reads files from disk and waits on the network. Will it speed up much? Why or why not?
What's the main risk of dropping PyPy into an existing project, beyond "it's a different interpreter"?
Is Cython just "a faster Python interpreter" you run your .py files with? If not, what is it?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play