This page was last modified 22:47, 2 March 2008.
How to compile PyS60 scripts and libraries to bytecode
From Forum Nokia Wiki
Prerequisite
You need to install python 2.2.2 on your machine. It can be downloaded at http://www.python.org/download/releases/2.2.2/.
I kept the installation folder by default (C:\>Python22) in order not to interfere with my current Python 2.5 installation (installed in C:\>Python).
Compile PyS60 script to bytecode
- Go to C:\Python22> from the command prompt
- Type python and you should get the following output:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) \[MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
import py_compile py_compile.compile("\\path\\to\\mymodule.py")
It will result a mymodule.pyc file at the given path.
Compile your PyS60 library to bytecode
- Go to C:\Python22> from the command prompt
- Type python and you should get the following output:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) \[MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>>
import compileall compileall.compile_dir("\\path\\to\\myLibrary\\Directory", force=1)
It will result *.pyc files recursively for each files at the given path including sub-directories, sub-sub-directories...
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Starting Mobile Development | rockzZ25 | Python | 8 | 2006-09-08 13:21 |
| How to compile PY to PYC? | JOM | Python | 13 | 2008-06-13 17:07 |
| PP and MIDP libraries | estav | Personal Profile | 1 | 2005-02-04 07:42 |
| How to use the soap libraries with s60 nokia phones? | bharatan.vk | Python | 0 | 2007-05-18 08:23 |
| script split to more than 1 py file | roidayan | Python | 3 | 2008-01-27 19:26 |
