|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. Thanks |
|
#2
|
||||
|
||||
|
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 Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
Quote:
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? |
|
#4
|
||||
|
||||
|
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. Take care, Mark. |
|
#5
|
|||
|
|||
|
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 http://www.pythonmac.org/wiki/BundleBuilder |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
||||
|
||||
|
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
![]() http://www.python.org/doc/2.3.4/mac/undocumented-modules.html Thats not going to make things easy to get to grips with . Thanks much for the info ill look closly at BundleBuilder,Mark. Last edited by netytan : August 4th, 2004 at 12:04 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Compiled Python Code |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|