You Are Here:

Community: Developer Discussion Boards

#1 Old how to release a program using Python - 2008-12-12, 09:18

Join Date: Oct 2008
Posts: 2
fanogee
Offline
Registered User
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..
Reply With Quote

#2 Old Re: how to release a program using Python - 2008-12-12, 15:29

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
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.
Reply With Quote

#3 Old Re: how to release a program using Python - 2008-12-13, 03:33

Join Date: Oct 2008
Posts: 2
fanogee
Offline
Registered User
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
Reply With Quote

#4 Old Re: how to release a program using Python - 2008-12-13, 08:16

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
See this article for compiling py files to pyc.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia