Run pyc file without specifying python path ?
PythonAB
python at rgbaz.eu
Thu Jul 30 05:17:51 EDT 2009
>>
> Hi Dave,
> Your solution sort of defeats my intended purpose (sorry for not
> divulging my 'hidden agenda').
> I wanted my application to "hide" the fact that it's a python
> script, and look as much as possible like it's a compiled program.
> The reason I don't just give my user a py file, is that I don't want
> a cleaver user to change the innards of the script.
> On the other hand, I don't want to make a compiled (freezed?)
> version of the application, because it'll grow the resulting file
> significantly, and I don't have the experience to know how it will
> run on different Linuxes.
> Bye,
> Ron.
Hey Ron,
What i usually do to accomplish this is compile the script to a .pyc
just like you
did and then call that pyc from another script that's not compiled.
so in your case the not compiled script looks like:
#!/usr/bin/env python
import test_pyc.pyc
then run that script...
hope this helps...
alternatively you might have a look at:
http://www.pyinstaller.org/
gr
Arno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090730/f303bad5/attachment-0001.html>
More information about the Python-list
mailing list