×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    3

    3 basics questions on Python scrips for N95

    I have several questions:

    1 - What do I need to set up a dev environment for Python script (I have a N95)?

    2 - Is it possible/easy to deploy a Python script with its icon? How?

    3 - How difficult is it to have an icon in the application list, and when this icon is picked/started a script launches a browser with a hardcoded URL?
    If you have an idea on what this script may look like please help me.

    Rgrds

  2. #2
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    80

    Re: 3 basics questions on Python scrips for N95

    Questions answered.. or tried to..

    1 - What do I need to set up a dev environment for Python script (I have a N95)?

    You just need a python environment to code in and then you can connect with usb to upload the scripts to the phone z:/python/lib or just z:/python if its only a script (not a library), if you are using windows and have bluetooth in your computer you can also connect from python to the hyperterminal (search the boards for this)

    2 - Is it possible/easy to deploy a Python script with its icon? How?

    Yes, its possible, you have to get pys2sis to turn your py into a sis file, you should go to symbiansigned.com to get the software to sign the file and search the board for more details about this..

    Here is Cyke's guide
    http://cyke64.googlepages.com/signyour3rdapp%21

    3 - How difficult is it to have an icon in the application list, and when this icon is picked/started a script launches a browser with a hardcoded URL?
    If you have an idea on what this script may look like please help me.


    Some nice info if you are just starting can be found here:
    http://wiki.forum.nokia.com/index.php/Category:Python

    and this is the function that opens the browser programatically


    def display_in_browser(url):
    """
    Launches the browser with the given url
    """
    import e32
    import sysinfo
    internal_url = '4 '+ url + ' 1'
    b = 'BrowserNG.exe'
    e32.start_exe(b, ' "%s"' %internal_url, 1)

  3. #3
    Registered User
    Join Date
    Sep 2003
    Posts
    77

    Re: 3 basics questions on Python scrips for N95

    Thanks for posting the code example federico2929!

    It works on my 3rd Ed phone (6120c) and in the 3rd FP1 SDK, but with one drawback: the requested url is opened in the 'background'. The 'bookmarks' view is the active view in the browser while the requested web site is displayed 'in the backgound' and becomes only visible after hitting the 'back' command button in the bookmarks view. Any trick to avoid this?

    Some of the arguments passed to BrowserNG.exe are documented in a post by fredrian (http://discussion.forum.nokia.com/fo...04&postcount=9). Is a more comprehensive documentation of these arguments available?

    TIA Martin

  4. #4
    Registered User
    Join Date
    Jun 2005
    Posts
    386

    Re: 3 basics questions on Python scrips for N95

    2.

    Since you have a N95 (i.e. S60 3rd edition device) you should take a look at ensymble:
    http://www.nbl.fi/~nbl928/ensymble.html

    If lets you (among other things) create a standalone application (which has its own icon in menu) and pack it into a sis file.

  5. #5
    Registered User
    Join Date
    Mar 2009
    Posts
    2

    Re: 3 basics questions on Python scrips for N95

    Hello,

    It seems that this works

    Code:
    url = '4 www.symbian.com' # 4 means Start/Continue the browser specifying a URL
    
    b = 'BrowserNG.exe' # or with the full path b='z:\\sys\\bin\\BrowserNG.exe[
    
    e32.start_exe(b, ' "%s"' %url, 1) # the space between ' and " seems to be important so don't miss it!
    (from http://discussion.forum.nokia.com/fo...errerid=380323)

    cheers,

    -h

Similar Threads

  1. Please help installing Python libraries on S60
    By ericroijen in forum Symbian
    Replies: 11
    Last Post: 2009-07-18, 10:43
  2. [announce] PyUIQ. Python for UIQ 2.1 and 3.x
    By OscarBernabeu in forum Symbian
    Replies: 35
    Last Post: 2008-01-17, 09:12
  3. Replies: 11
    Last Post: 2007-10-03, 19:46
  4. Replies: 3
    Last Post: 2007-03-13, 06:50
  5. questions about py2sis
    By simonhardyfrancis in forum Symbian
    Replies: 12
    Last Post: 2005-06-22, 14:17

Posting Permissions

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