×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    51

    Python created sis-file problem

    Hi,
    my python created sis- files works fine on N90! (sdk 2nd,fp2)
    well........., if it is fine, that I must make 2 sis- files for every application.
    The first one is only one line: exec to the file "...System\Apps\my_real_app\default.py".

    I experimented with "direct" application starting, but if Ï had
    "import appuifw" in the application it crashed immediately.
    If I had "from appuifw import *, I was able to "debug" it sometime
    before crash with note- functions scattered around the application
    before crash!
    Hm........................

    Any ideas?

    Thanks

  2. #2
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Python created sis-file problem

    hello ,

    I don't understand what you want to do

    So if you want put few lines in default.py file you can do like this
    Code:
    #
    # default.py
    #
    
    import sys
    import os
    import appuifw
    
    #=
    #= Force importing from the local directory first.
    #=
    localpath = str(os.path.split(appuifw.app.full_name())[0])
    sys.path  = [localpath] + sys.path
    
    import appname
    
    try:
      application = appname.Myapp()
      application.run()
    except:
      appuifw.note(unicode(sys.exc_info()))
    Code:
    #
    # appname.py
    #
    
    import appuifw
    import os
    import sys
    import e32
    
    class Myapp:
    
        def __init__(self):
            self.script_lock = e32.Ao_lock()
            #
            # init codde ...
            # 
            self.script_lock.wait()
            
        def run(self):
            #
            # your codde
            #      
            self.script_lock.wait()
            
    if __name__ == '__main__':
        #
        # if you launch script from Python shell
        #
        application = Myapp()
        application.run()   
    
    #
    # appname.py in the same folder
    #
    I hope this can help you
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  3. #3
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    51

    Re: Python created sis-file problem

    Thanks,
    still may be some communication problem,
    I can't say clearly what I want.

    What I want, is to run sis-file application easily, just
    clicking icon.
    Easy "hello world" applicatin (sis-file) did work fine and simply
    from icon.

    When I did a more compicated application it did not.
    Odd thing is that it ( big application) is good enough to work when
    started this very odd way using extra sis- file with only one
    line to make exec to my big application in the file hierarchy.

    How it can work using this extra sis-file but not directly as
    "hello world" or my startup- sis file with one line, which work clicking icons?

    It would be understabe if my big application would be so faulty
    that it do not work at all (not even with this kind of trick).
    How this trick can help, the application code (sis-file) is the same.
    But I refer to it throuht it's included default.py stored as a
    part of stored sis- file (consisting 3 files).

    Thanks anyway

  4. #4
    Regular Contributor
    Join Date
    Sep 2006
    Posts
    51

    Re: Python created sis-file problem

    Hi,
    my application works now nicely, normal icon start.

    I replaced "from appuifw import *" with "import appuifw",
    can't undrstan still how this is so important but who cares.

  5. #5
    Registered User
    Join Date
    Oct 2005
    Posts
    10

    Re: Python created sis-file problem

    Hi,
    I found the same problem too. Tested on Nokia 3230 with Python 1.3.8
    If I use 'from appuifw import *', my app won't start, no any errors.
    But if I use 'import appuifw', everything works fine.

    If I run *.py as script, it works both 'from appuifw import *' and 'import appuifw'.
    Last edited by supertoync; 2006-10-18 at 10:54.

Similar Threads

  1. Multiple programs within single SIS file dilema
    By LongSteve in forum Symbian
    Replies: 6
    Last Post: 2008-03-20, 06:05
  2. Problem in building a SIS file
    By ravi_sashank in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2006-08-19, 19:38
  3. Common problem: wrong file format "exception"
    By lukaszpl in forum Mobile Java General
    Replies: 0
    Last Post: 2005-12-05, 17:09
  4. sis file problem
    By songlinhe in forum Symbian
    Replies: 1
    Last Post: 2004-10-21, 10:47
  5. merging 2 sis file of same application
    By amardeep in forum Symbian
    Replies: 2
    Last Post: 2003-04-25, 07:48

Posting Permissions

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