×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    80

    Question About packaging a python application

    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

  2. #2
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: About packaging a python application

    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()

  3. #3
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: About packaging a python application

    > 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

    http://mfabrik.com
    http://blog.mfabrik.com

Similar Threads

  1. Launching a dialog when the application starts
    By Uriah Eisenstein in forum Symbian User Interface
    Replies: 10
    Last Post: 2009-03-31, 09:06
  2. Replies: 0
    Last Post: 2007-12-22, 07:13
  3. How can the WAP browser communicate to J2ME application?
    By hbfornies in forum Mobile Java General
    Replies: 20
    Last Post: 2007-03-02, 16:32
  4. Changing the ordinal position of an exteranl application.
    By Shaikuny in forum Symbian User Interface
    Replies: 1
    Last Post: 2004-12-30, 07:32
  5. Replies: 0
    Last Post: 2004-12-13, 11:05

Posting Permissions

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