August 2nd, 2004, 06:40 PM
Compiled Python Code
I have been searching around for a way to compile my python scripts beyon .pyc or .pyo files mainly because my company would like to distribute some applications however those byte code files are EASILY decompiled by using the disutils module and by any other methods... Also above the fact that a lot of it is still readable in a text editor.
At any rate, I don't want an answer like say it in the EULA or something dumb like that. I'm looking specifically for something to do code obfuscation or compile it to bit code if that is at all possible.
August 2nd, 2004, 07:20 PM
Is this for a windows platform?? If so, search this forum for "py2exe" and you'll find plenty of discussions.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
August 2nd, 2004, 07:39 PM
Well I am actually making a bundle for Mac but I believe the scripts for windows are still left in .py/.pyc format someone in the dlls or exe am I correct?
Originally Posted by Scorpions4ever
August 3rd, 2004, 12:11 PM
Py2exe will not work on a Mac as far as i know. Anyway I have a 12" Ibook and after searching a little i havnt found anything that looks like it could do the job.
However the subject does interest me since it would be nice to be able to make stand alone app's with Python on the Mac.
Feel free to email/PM/IM me if you would want and we can brain storming it, maybe come up with a solusion.
August 3rd, 2004, 02:19 PM
netytan, look up "bundlebuilder" to bundle your python app for mac. It is a module shipped with your mac (or at least mine) that can bundle your python app to a .app. Ummm, as you know a .app is really a folder so you can get into the content and find your scripts in the Resources folder so it's really hiding your code that much either.
Here's a start
August 3rd, 2004, 05:51 PM
There is a utility called freeze that comes with the python sources that will allow you to do what you want (to some extent). It will bundle the .pyc files into object files so you can recompile the Python sources and link the .pyc files into the executable. This is more complicated to do than using py2exe but (1) it should work for any platform, and (2) there are no .pyc files, since it is all in the executable. The bytecode would still be visible to someone using a hex viewer, but you could possibly hook into the import mechanism and add some encryption.
Dave - The Developers' Coach
August 4th, 2004, 01:00 AM
Frell, well, i guess that means that there are Python modules spacifically for Mac that arnt documented with the other Python modules, or with the undocumented modules
Thats not going to make things easy to get to grips with . Thanks much for the info ill look closly at BundleBuilder,
Last edited by netytan; August 4th, 2004 at 01:04 AM.