You Are Here:

Community: Developer Discussion Boards

#1 Old Question About packaging a python application - 2008-02-03, 23:55

Join Date: Jan 2007
Posts: 80
federico2929
Offline
Regular Contributor
Hi,

I am in the mists of trying to package my python application and wanted some pointers on how I should work with file locations and the rest, or if there is a nice tutorial anywhere a pointer to it.

Here are the questions I have:

1) How should I reference the data files that my program uses?

Explanation:

My program has certain configuration files that it uses. Should I have my program generate them after its installed or can I package them in a particular location with ensymble?

2) When I am developing an application in python, I have a directory structure where the files reside depending on what they do, later when I run the program in the phone I add this files to the path before importing them. Should I stop doing this and just have them all in the base directory?

3) Are there any other differences that I should know about when I am trying to make programs to be installed and when I just run them through the python program in the phone?

Thanks
Reply With Quote

#2 Old Re: About packaging a python application - 2008-02-04, 06:58

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Online
Forum Nokia Champion
Quote:
Originally Posted by federico2929 View Post
Hi,

I am in the mists of trying to package my python application and wanted some pointers on how I should work with file locations and the rest, or if there is a nice tutorial anywhere a pointer to it.

Here are the questions I have:

1) How should I reference the data files that my program uses?

Explanation:

My program has certain configuration files that it uses. Should I have my program generate them after its installed or can I package them in a particular location with ensymble?

2) When I am developing an application in python, I have a directory structure where the files reside depending on what they do, later when I run the program in the phone I add this files to the path before importing them. Should I stop doing this and just have them all in the base directory?

3) Are there any other differences that I should know about when I am trying to make programs to be installed and when I just run them through the python program in the phone?

Thanks
3)How did you define the exit function in your application? I know I had problems with this one....
It's supposed to look something like this (took me a while to find out about the appuifw.app.set_exit):

Code:
def quit():
    app_lock.signal()
    appuifw.app.set_exit()
Reply With Quote

#3 Old Re: About packaging a python application - 2008-02-04, 21:56

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
> 1) How should I reference the data files that my program uses?

I guess configuration files should go to the UID private folder (/private/$UID) of your application on S60 3.0. Uninstaller should clean up these files. For example, you can add zero sized files into your SIS/PKG so that Symbian installer knows about the files even though they don't have meaningful content during the installation.

> When I am developing an application in python, I have a directory structure where the files reside depending on what they do, later when I run the program in the phone I add this files to the path before importing them. Should I stop doing this and just have them all in the base directory?

This is ok. However, .py (or compiled .pyc) module files should be nested under the private folder of the application, so that third parties cannot mess with them (easily).

> Are there any other differences that I should know about when I am trying to make programs to be installed and when I just run them through the python program in the phone?

Yes. Stand-alone executables need certification and capabilities assigned for them. This is not relevant for the PyS60 shell (python program in the phone), since it's signed by Nokia. Certification is major Pain In The Ass on Symbian, so be prepared to learn it in hard way

-Mikko


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
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
Launching a dialog when the application starts Uriah Eisenstein Symbian User Interface 10 2009-03-31 10:06
How to send an application in background using Python for S60 ??? smilesnigam Python 0 2007-12-22 08:13
How can the WAP browser communicate to J2ME application? hbfornies Mobile Java General 20 2007-03-02 17:32
Changing the ordinal position of an exteranl application. Shaikuny Symbian User Interface 1 2004-12-30 08:32
Changing ordinal position of an external application. Shaikuny General Symbian C++ 0 2004-12-13 12:05

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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ