You Are Here:

Community: Developer Discussion Boards

#1 Old Start_exe does not start in sis-packaged Python-app - 2006-06-17, 11:44

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
I want to start camera from my python application. It works well when I run app as a script (Choose->Run script), but if I make a sis-package, running this test program generates System error (-2) (in N70) or no error at all (6630).

Here is the simpliest example to reproduce the problem:
Code:
# default.py
import e32
try:
    # 6630, 6680
    # campath = u'z:\\system\\apps\\camcorder\\camcorder.app'
    # N70
    campath = u'z:\\system\\apps\\CamMojave\\CamMojave.app'
    appuifw.note(u"Starting camera")
    e32.start_exe(u'z:\\system\\programs\\apprun.exe', campath, 1)
    appuifw.note(u"Camera finished")
except:
    appuifw.note(u"Could not start camera")
I made sis-package with command
py2sisng.py --version=0.02 --uid=0x01361999 --appname=CamTest --lang=EN --verbose default.py camtest.sis

The real app I am coding works with out any other problems but this (as sis-packaged). Sis-packaged version produces System error (-50). (Not -2!)

Mysterious. Does somebody know the solution?
Reply With Quote

#2 Old Re: Start_exe does not start in sis-packaged Python-app - 2006-06-18, 14:04

Join Date: May 2004
Posts: 524
Location: Tampere, Finland
jethro.fn's Avatar
jethro.fn
Offline
Forum Nokia Champion
You forgot "import appuifw". The script environment has it already imported, but stand-alone apps do not. There are subtle differences like this that can bite you when packaging apps.

I tested the packaged version in my 6600 and it worked after adding the missing import (and changing campath to u'z:\\system\\apps\\camera\\camera.app').
Reply With Quote

#3 Old Re: Start_exe does not start in sis-packaged Python-app - 2006-06-18, 21:18

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
Quote:
Originally Posted by jethro.fn
You forgot "import appuifw". The script environment has it already imported, but stand-alone apps do not.
You're right, I got the test program working also after adding this missing import.

Unfortunately my "real app" had already import appuif and your solution did not help in that case.

I'll keep debugging...
Reply With Quote

#4 Old Re: Start_exe does not start in sis-packaged Python-app - 2006-06-18, 21:47

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
Quote:
Originally Posted by aaaaapo
- - I got the test program working also after adding this missing import.
Unfortunately my "real app" had already import appuif and your solution did not help in that case.
...but this import stuff lead me to the solution. Problem was not start_exe-related but import-related. It seems that script environment sees more modules than sis-packaged version. I added import sys and import os.path (used just before start_exe-part) and then sis-version started camera successfully.
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
Reminder of Python app gallery URL slitchfield Python 0 2006-02-14 09:55
Embedding python in an app varunc Python 1 2005-12-03 08:01
Stand-alone Python app not launched correctly from other native app bercobeute Python 2 2005-03-04 15:30
Start the own app from command line in emulator vsuontam Symbian Tools & SDKs 0 2005-01-11 11:56
How to start an app from the main menu with a key press emcolo General Symbian C++ 0 2004-01-12 18:47

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