You Are Here:

Community: Developer Discussion Boards

#1 Old Python & native applications - 2005-01-05, 14:36

Join Date: Mar 2003
Posts: 14
t1i2m3o4
Offline
Registered User
Some novice questions about the topic:

1. Am I able to start Python applications from native Symbian applications, or vice versa?

2. If the answer is yes, is there any mechanism for passing messages between the two, Python and native Symbian application?


Regards,
Reply With Quote

#2 Old Re: Python & native applications - 2005-01-05, 15:05

Join Date: Aug 2003
Posts: 3
Location: Helsinki, Finland
tapio111
Offline
Registered User
Quote:
Originally posted by t1i2m3o4
Some novice questions about the topic:

1. Am I able to start Python applications from native Symbian applications, or vice versa?

2. If the answer is yes, is there any mechanism for passing messages between the two, Python and native Symbian application?

Regards,
Yes. Calling Python from native is described in Appendix B of API reference.
To open native apps, Content_handler is the easies t way: it opens the registered application for the given content type. The more general way is to use start_exe.

To communicate, you can use command line parameters, file system, or native databases. Sockets should also work.
Reply With Quote

#3 Old 2005-01-05, 18:46

Join Date: Jul 2004
Posts: 76
eriksmartt
Offline
Regular Contributor
Just to add a little more detail to tapio111's post about using start_exe() to launch a native applications....

start_exe() takes two parameters. The first is the path to "apprun.exe", which for me is "z:\\system\programs\apprun.exe"; and the second argument is the path to the app you want to launch. Putting it together looks like this:


>>> import e32

>>> e32.start_exe('z:\\system\\programs\\apprun.exe', 'z:\\system\\apps\\camcorder\\camcorder.app')
Reply With Quote

#4 Old 2005-03-07, 21:11

Join Date: Feb 2004
Posts: 3
mark.adler
Offline
Registered User
Some more questions about start_exe:

I've been experimenting with starting Python scripts (installed using py2sis) as separate processes - -seems to work fine.

1) When a new process starts it paints a splash screen of sorts on the phone. Can this be suppressed? I really want this process to be invisible to the user.

2) start_exe kicks off the new process and returns immediately. Is there a way to block until the new process finishes? I think in most cases this is the behavior I want, but I'm just curious....
Reply With Quote

#5 Old 2005-03-07, 21:49

Join Date: Feb 2004
Posts: 3
mark.adler
Offline
Registered User
Doh! OK I found the optional arg to start_exe(filename, command, [wait])

I still have the pending question about the "splash screen".
Reply With Quote

#6 Old Re: Python & native applications - 2006-02-01, 05:38

Join Date: Sep 2005
Posts: 314
Location: Finland, Helsinki
aaaaapo
Offline
Regular Contributor
Quote:
Originally Posted by eriksmartt
Just to add a little more detail to tapio111's post about using start_exe() to launch a native applications....

start_exe() takes two parameters. The first is the path to "apprun.exe", which for me is "z:\\system\programs\apprun.exe"; and the second argument is the path to the app you want to launch. Putting it together looks like this:

>>> import e32
>>> e32.start_exe('z:\\system\\programs\\apprun.exe', 'z:\\system\\apps\\camcorder\\camcorder.app')
The path to the camera.app seems to vary between phone models.
In Nokia 6600 is is: 'z:\\system\\apps\\camera\\camera.app' an in Nokia 6680
'z:\\system\\apps\\camcorder\\camcorder.app'.

Is there any generic way to start camera-application in all phone models?
Reply With Quote

#7 Old Re: Python & native applications - 2006-07-07, 12:08

Join Date: Nov 2004
Posts: 105
rexwal
Offline
Regular Contributor
hi erikk,

Just wondering, which application launches the default MIME type handler?
E.g. Starter is to re-start the phone, AppRun is to run an app, is there a default process that launches the correct handler for say .jpg?

Cheers,
rexwal
Reply With Quote

#8 Old Re: Python & native applications - 2006-07-07, 12:25

Join Date: Nov 2004
Posts: 105
rexwal
Offline
Regular Contributor
I can't find content_handler in the python document, nor appendix B
Reply With Quote

#9 Old Re: Python & native applications - 2006-08-23, 15:06

Join Date: Aug 2006
Posts: 8
firebabe
Offline
Registered User
hi

can anybody tell me what's the path to the camera app on a 3rd edition device (N80)?

all paths named in this thread didn't worked on my phone

cheers

------------------------------------------------------------------------------------------

just after posting if've found an app called Best TaskMan (similar to TaskSpy suggested here) which installed on my phone without any error...

here are the results:
- camera: z:\sys\bin\CamMojave.exe
- music player: z:\sys\bin\MusicPlayer.exe
- gallery: z:\sys\bin\MediaGallery2.exe
- calendar: z:\sys\bin\Calendar.exe


hopes this helps someone!
Last edited by firebabe : 2006-08-23 at 16:08.
Reply With Quote

#10 Old Re: Python & native applications - 2006-08-23, 16:33

Join Date: Aug 2006
Posts: 8
firebabe
Offline
Registered User
i'm now starting an application this way:

Code:
campath = u"z:\\sys\\bin\\CamMojave.exe"
e32.start_exe(campath, "", 1)
and not like this anymore

Code:
e32.start_exe('z:\\system\\programs\\apprun.exe', 'z:\\system\\apps\\CamMojave\\CamMojave.app')
guess it is like this since in 3rd edition the applications are now real exe and though can be started directly via first parameter in e32.start_exe(), is it?

has anybody more (advanced) experience about this topic?
Reply With Quote

#11 Old Re: Python & native applications - 2006-08-23, 19:32

Join Date: Aug 2004
Posts: 290
simo.salminen
Offline
Regular Contributor
Well, only difference is that the application bootstrapping is done bit differently.

In <3rd ed, applications are regular polymorphic dlls with one entrypoint. The UI framework (apprun.exe) loads the dll, and calls the entrypoint. That function returns a object, which is used to load rest of the application.

In 3rd ed, applications are exe files. When the exe file is launched, it has main() function which calls the UI framework, and yields the control to it. After that, things work exactly the same way as in 2nd ed.
Reply With Quote

#12 Old Re: Python & native applications - 2008-05-31, 04:23

Join Date: Feb 2008
Posts: 8
gunnrosebutpeace
Offline
Registered User
Does anyone know how to start a java application from python.
What I am trying to do is to build Shortcuts application (similar to quick launch...). I am able to start the native app (.exe) using start_exe, but unable to start java app.
thanks
Reply With Quote

#13 Old Re: Python & native applications - 2009-08-11, 14:24

Join Date: Jan 2009
Posts: 2
vinaykumar304
Offline
Registered User
I am looking for launching a j2me app from a symbian app. is there a way to do it? If yes, is there a way to pass any parameters from the already running symbian app to the j2me app?
Please help.
Reply With Quote

#14 Old Re: Python & native applications - 2009-08-11, 15:44

Join Date: Sep 2008
Posts: 175
Location: London, UK
the86hitman's Avatar
the86hitman
Offline
Regular Contributor
Quote:
Originally Posted by vinaykumar304 View Post
I am looking for launching a j2me app from a symbian app. is there a way to do it? If yes, is there a way to pass any parameters from the already running symbian app to the j2me app?
Please help.
been discussed in many topics before. You must know the UID and use LAA extension to launch the app. LAA is so far only available for PyS60 1.4.5
not sure about passing parameters though.

see here: http://discussion.forum.nokia.com/fo...d.php?t=146879


The86Hitman
PyS60 1.9.7 on E71
http://www.drhtailor.com/pys60
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

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