Hello. I, like many, do not want to just write Python code, I want to also make EXE applications. I have already achieved a lot, wrote the application on Pygame, compiled it into EXE, did the NSIS installer. However, the problem of open source has been hanging over me - anyone can take decompyle and pick up my .PYC files. And then Cython came to the rescue (not to be confused with CPython), which is compiled into a DLL (PYD) and not decompiled (the champion in opening sources with the help of a decompiler still opens it, but the chance is still very small). The trick is that I did everything as instructed, but "not growing in the garden" - gave an error. Here is my Cython compiler script:
from distutils.core import setup from Cython.Build import cythonize setup( name = 'JoyMonitorMain', ext_modules = cythonize("joymonitor.pyx"), ) And here is the error:
joymonitor.pyx:16:12: Expected an identifier Traceback (most recent call last): File "cythonise.py", line 6, in <module> ext_modules = cythonize("joymonitor.pyx"), File "C:\Program Files\Python34\lib\site-packages\Cython\Build\Dependencies.py", line 934, in cythonize cythonize_one(*args) File "C:\Program Files\Python34\lib\site-packages\Cython\Build\Dependencies.py", line 1056, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: joymonitor.pyx I ran the compilation script on the command line with the command:
python cythonise.py build_ext --inplace
Just in case, I will say that I did not use Cython earlier. And in my code, there may be some nonsense for C, which is the syntax of Python 3, for example, the string literals 'замечательная строка про погоду' instead of "замечательная строка про погоду" . Does it matter to cython?
I checked the code and read the documentation - my code is compatible with Cython. But I still do not understand what kind of error? What doesn't he like?
python(specified in the PATH), then there is no error! - Vladislav Toncharov