Try precompiling your app into a .pyc file (or for a slight performance and size gain, .pyo file). .pyc and .pyo files are platform-independent Python bytecode files, so you can compile your scripts to .pyc or .pyo files on a PC and then package them to a .sis. They should work on the phone too, as long as you use Python 2.2.2 for compilation on the PC side.
Yes, it's right but sometime py2sis.exe doesn't works very good. It insert into sis this default.py. For this reason sometime
i see my source code other that code.
-----------------------------
import sys
import os
import appuifw
import series60_console
if os.path.exists(my_script_dir):
script_list = map(lambda x: os.path.join('my',x),\
filter(is_py, os.listdir(my_script_dir)))
script_list += filter(is_py, os.listdir(this_dir))
index = appuifw.selection_list(map(unicode, script_list))
if index >= 0:
execfile(os.path.join(this_dir, script_list[index]), globals())
Originally posted by spaceman76 Yes, it's right but sometime py2sis.exe doesn't works very good. It insert into sis this default.py. For this reason sometime
i see my source code other that code.
If you have a file named "default.py" in the same folder were you are invoking "py2sis" with some other script as argument (e.g. "foobar.py) it will always place script "default.py" to the created SIS file and not the one given as command line parameter (e.g. "foobar.py").
"
Originally posted by spaceman76 Yes, it's right but sometime py2sis.exe doesn't works very good. It insert into sis this default.py. For this reason sometime
i see my source code other that code.
----------------------
sorry then, I don't use py2sis to make standalones
So to create a commercial application i must
follow these steps:
1) create myApplication and precompiling into a myApplication.pyc file.
2) create startMyApplication.py that execute myApplication.pyc.
3) py2sis startMyApplication.py to create startMyApplication.sis.
4) Unzip startMyApplication.sis to insert into myApplication.pyc in /system/libs/.
5) Create myApplication.sis and then install it.
Originally posted by spaceman76 Thank you, now works correctly.
So to create a commercial application i must
follow these steps:
1) create myApplication and precompiling into a myApplication.pyc file.
2) create startMyApplication.py that execute myApplication.pyc.
3) py2sis startMyApplication.py to create startMyApplication.sis.
4) Unzip startMyApplication.sis to insert into myApplication.pyc in /system/libs/.
5) Create myApplication.sis and then install it.
There are other solutions ?
You can also give a directory name to py2sis to package all files in that directory.