Created
May 11, 2024 19:22
-
-
Save m33m33/4e45788ef563d08594ba27cd918dcaf7 to your computer and use it in GitHub Desktop.
Mistral.ai generated hello world cytonized exemple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create setup.py file: | |
from setuptools import setup | |
from Cython.Build import cythonize | |
setup( | |
ext_modules = cythonize("hello.pyx") | |
) | |
Create hello.pyx file: | |
print("Hello, World from Cython!") | |
Compile hello.pyx : | |
python setup.py build_ext --inplace | |
Create hello_cython.py file: | |
import hello | |
Run hello_cython.py: | |
python hello_cython.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
python hello_cython.py output: Hello, World from Cython!