smart solutions for small devices
[ start | index | login ]
start > PYTHON > Distributing Python apps

Distributing Python apps

Created by bjoernQ. Last edited by bjoernQ, 8 years and 111 days ago. Viewed 1,462 times. #1
[edit] [rdf]
labels
attachments
While I'm not very familiar with python this might be obvious for you but since the python S60 port is really a nice toy for J2ME developers to play around and write little helper apps for out MIDlets this might be useful. (Since python has support for sockets we could write something that access the native symbian stuff for our MIDlets and connect to them via tcp/ip).

The problem I was faced to was that I wanted to give a little python script to someone but don't wanted him to look into the code.

I downloaded python 2.2.2 for my windows box and used the "compiler" module (compiler.compileFile) to compile my script. But when this compiled script was transfered to the phone the only option was "install as a library". Since py2sis don't likes *.pyc files I decided to do the following:

Compile the python-script as described. Let the user intall it as a module and do a very simple python script that just imports the compiled module. The minimal python script can then be packaged by py2sis. The enduser only needs to install the python runtime. Beam the *.pyc to the phone and install it and then install the created SIS.

Wow. That was easy.

I think it's quite possible to decompile the pyc file but it's harder than just open the *.py file in notepad.

Please login to post a comment.
www.mobile-j.de | Bjoern Quentin