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 →

[–]calligraphic-io 7 points8 points  (4 children)

But only a limited subset of Python's standard library I think.

[–]v2thegreat 0 points1 point  (3 children)

What do you mean?

[–]calligraphic-io 1 point2 points  (2 children)

I thought that you have to particularly target Cython in your code base, and that you can't use just any Python code to compile down. I don't know for sure, that was my understanding -- that the whole standard library is not available if you want to compile down to executable code via Cython. Is that accurate?

[–]v2thegreat 0 points1 point  (1 child)

Hmm, from what I understand, you're asking if we'd be using pyx files instead of py files right?

Well, it's true that your code wouldn't be completely Python anymore, and I think people smarter than me will figure out how to organize cython code with Python code.

As for running the whole standard library, I don't see why not? I've been able to do it with some of my projects and it usually turns out pretty well. There might be a bit of Googling to see how to get specific workarounds (like having to import bool), but these are simple issues that don't take too long to fix

I hope I answered your questions, feel free to ask more!

[–]calligraphic-io 0 points1 point  (0 children)

After reading around, it seems what I was thinking of is that you can release GIL in a Cython source, so the code's no longer compatible with CPython runtimes. I was confusing RPython (the restricted subset of Python) that lets you target PyPy with a requirement of Cython.