| Reply | « Previous Thread | Next Thread » |
|
Hi,
This is the first time to use python and have some problems, could anyone give some clues? I am recently have a program developed with Python, and tried with Ensymble to packet it, It works! However, my concern is is there anyway not to include the .py source file in my packet? Just as you know, in other platforms such as windows, it is fine to use some 3rd party tools to compile into executable binary. I am also failed to generate the .pyc... Another one is in PyS60, is there any module exist to decode character of 'gb2312' into unicode? Thanks for any help from you.. ![]() |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
Hi fanogee,
Actually one way to protect it is converting to .pyc, but even if you do that, there are processes for reverting .pyc to .py. Currently there is no way for protecting completely you script, maybe because Python was made to be an open-source language ![]() About converting to unicode, use this: Code:
#Encode
string.encode('utf-8')
#Decode
string.decode('utf-8')
Hope it helps, Rafael.
Last edited by Rafael T. : 2008-12-12 at 16:14.
|
|
Hi Rafael,
Thanks for your information.. pyc is acceptable for me(since python is open source language, I am happy for that. ![]() Is there any way to generate the pyc in PyS60? I tried to generate it in other platform but failed to use these .pyc in PyS60 (seems there is some incompatible betreen differnet versions). As to convert to unicode, your code is about 'utf8'. In python of other platform, a module for 'gb2312' exists, but it is missed in PyS60(I guess the reason might be the big mapping table from 'gb2312' to unicode), it is too bad for most text file edited in windows of chinese version is saved with 'gb2312'). Thanks anyway.. fano.ge |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Online
Forum Nokia Champion
|
|
See this article for compiling py files to pyc.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| python program help | jvignacio | Python | 1 | 2008-12-07 07:02 |
| Ask The Expert: dcrocha on Python | Nokia Ron | Interviews & Ask the Experts | 15 | 2008-04-21 21:51 |
| [announce] Mobile Python book soon in Sept 2007 ! | cyke64 | Python | 11 | 2007-10-03 20:46 |
| Python for S60 1.3.14 released | jplauril | Python | 11 | 2006-11-27 18:43 |
| 'Program closed: python'. When does this show up? | bercobeute | Python | 4 | 2006-01-02 22:12 |