| Reply | « Previous Thread | Next Thread » |
|
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")
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? |
|
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'). |
|
Quote:
Unfortunately my "real app" had already import appuif and your solution did not help in that case. I'll keep debugging... |
|
Quote:
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |