Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What about Cython?
#1
I 'm new in Python an trying to find how to 'bypass' some things.
e.g what I don't like in Python is the fact that when I make an .exe with PyInstaller, it's not a real executable but a 'bundle' of files (the python interpreter, my code etc).
Which means lower performance and that, easily, someone can steal your code.

So I was thinking, what if I used Cython?
Would this resolve my issues?
Reply
#2
It would help with the performance issues. But if someone really wants to steal your code, they can do it even if it's compiled. It's still code.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
Till now, I have no real performance issues.
But, what if an application becomes too big?

Also it seems to me that, because in an exe made by PyInstaller the code is not compiled, it's a lot easier to access the code than from a real exe.
Reply
#4
Quote:Also it seems to me that, because in an exe made by PyInstaller the code is not compiled, it's a lot easier to access the code than from a real exe.
It's not so much difference,reverse engineering can be done of "exe" from C/C++.

Pyinstaller dos not include source code.
Quote:The bundled app does not include any source code. However, PyInstaller bundles compiled Python scripts (.pyc files).
These could in principle be decompiled to reveal the logic of your code.

Software as a service is regarded as the safest way. 

Most Python project is open source is in the philosophy of Python,with a chosen licensen.
Can of course earn money even if code is open source,there are many models.
Eg Sentry.io all code is open on Github,what they earn money on is hosting(Easy setup)/support.
Reply
#5
I 'm trying to follow this guide, where it has a simple example of compiling a .py to C and then to exe!
It' s for linux, I 'm on Win XP Python 3.4, MingW, haven't made it yet.
With:
cython --embed -o helloworld.c helloworld.py
a file is created, helloworld.o.

Then with:
gcc -c  helloworld.c -o helloworld.exe -I/Python34/include
an executable is created(!!!) but when I run it, from console or by clicking it, it does nothing.

Has anyone tried this successfully in Windows?

(maybe it's a matter of python-dev, I haven't found it for Windows)
Reply
#6
But... why? It seems like you're going through a lot of effort to try to solve something that isn't even a problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to protect P/Cython Code against Reverse Engineering / Decompilation consuli 10 25,704 Oct-09-2017, 10:56 AM
Last Post: consuli74

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020