×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    158

    Stand-alone Python app not launched correctly from other native app

    Hi,

    I turned one of my Python scripts into a stand-alone Symbian app using py2sis and it all works fine. But now when I try to launch the stand-alone Python app from another application it hangs. It looks as if the Python interpreter hangs when it tries to load the script. The title appears and I can see the 'option' and 'cancel' menus, but they do not work. Furthermore the main area of the UI stays empty (while there should be text output).

    Any ideas?

    Cheers,
    Berco

  2. #2
    Super Contributor
    Join Date
    Dec 2004
    Posts
    643

    Re: Stand-alone Python app not launched correctly from other native app

    Originally posted by bercobeute
    Hi,

    I turned one of my Python scripts into a stand-alone Symbian app using py2sis and it all works fine. But now when I try to launch the stand-alone Python app from another application it hangs. It looks as if the Python interpreter hangs when it tries to load the script. The title appears and I can see the 'option' and 'cancel' menus, but they do not work. Furthermore the main area of the UI stays empty (while there should be text output).

    Any ideas?

    Cheers,
    Berco
    Which other application do you launch the Python app from and how do you do it?

  3. #3
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    158
    I *try* to launch the script from Flash Lite on a Nokia 600 (quite experimental, I know). Flash Lite has an option to launch native applications.

    Cheers,
    Berco

  4. #4
    Regular Contributor
    Join Date
    May 2007
    Posts
    75

    Re: Stand-alone Python app not launched correctly from other native app

    Hi,

    I had the same effect when interacting with the home screen on my N97. It too tries to start my python application whenever the user interacts with its widget on the home screen. And in that scenario too I get a UI that is empty. After a bit of debugging it turns out that in Python_appui.cpp the commented out line below should be replaced by the line that comes after it:

    Code:
    TBool CAmarettoAppUi::ProcessCommandParametersL(TApaCommand aCommand,
                                                 TFileName& /*aDocumentName*/,
                                                 const TDesC8& /*aTail*/)
    {
    //  if (aCommand == EApaCommandRun) {
      if ((aCommand == EApaCommandRun) || (aCommand == EApaCommandBackground)) {
    So, assuming the cause is the same in your case, there may be two things you can do:
    - see if you can send the EApaCommandRun command instead of the EApaCommandBackground command to the app

    - or, if like in my case you can't change that and you're *really* desperate:
    a) rebuild Python_ui, but change the LIT at the top of Python_ui.cpp to _LIT(KUiDLL, "kf_Python_appui_custom.dll");

    b) rebuild appui, where you change the code as described above and change the ouput filename in the mmp file to kf_Python_appui_custom.dll

    c) replace the <your_app_name_here>.exe in the SIS with the rebuilt python_ui.exe (don't forget to run ensymble altere32 on this)

    d) add kf_Python_appui_custom.dll to the SIS, to be installed in \sys\bin

    It is simple, really

Posting Permissions

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