×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    14

    Python & native applications

    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,

  2. #2
    Registered User
    Join Date
    Aug 2003
    Location
    Helsinki, Finland
    Posts
    3

    Re: Python & native applications

    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.

  3. #3
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    76
    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')

  4. #4
    Registered User
    Join Date
    Feb 2004
    Posts
    3
    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....

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

    I still have the pending question about the "splash screen".

  6. #6
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Python & native applications

    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?

  7. #7
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    105

    Re: Python & native applications

    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

  8. #8
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    105

    Re: Python & native applications

    I can't find content_handler in the python document, nor appendix B

  9. #9
    Registered User
    Join Date
    Aug 2006
    Posts
    8

    Re: Python & native applications

    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 15:08.

  10. #10
    Registered User
    Join Date
    Aug 2006
    Posts
    8

    Re: Python & native applications

    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?

  11. #11
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    295

    Re: Python & native applications

    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.

  12. #12
    Registered User
    Join Date
    Feb 2008
    Posts
    8

    Re: Python & native applications

    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

  13. #13
    Registered User
    Join Date
    Jan 2009
    Posts
    3

    Re: Python & native applications

    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.

  14. #14
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: Python & native applications

    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

Posting Permissions

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