×

Discussion Board

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

    Launching browser from python

    I'm new to s60 python and I have a question related to launching browser from a python script. I have a mobile minisite in url for example http://www.myminisite.mobi?pid=tyut76786.

    Is it possible to create a small python script that launches browser so that it loads my minisite?

    And my second question is; is it possible to dynamically create sis file so that it contains the correct url where pid is dynamic user related parameter?

    I need to create a prototype that makes our customer easier to access our mobile sites just by clicking an icon on their mobiles.

    cheers,

    jari

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Re: Launching browser from python

    Problem solved but I think I stick to midp 2.0 midlets to do the trick...

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

    Re: Launching browser from python

    so how did you launch the browser with a url?

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

    Re: Launching browser from python

    exact command is this
    import e32
    import os

    path = 'z:\\System\\Apps\\Browser\\Browser.app'
    apprun = 'z:\\system\\programs\\apprun.exe'

    def open(url):
    """Opens the webbrowser to the supplied URL"""
    apprun_arg = path + ' "' + url + '"'
    e32.start_exe(apprun,apprun_arg, 1)

    open("http://www.google.co.uk")

    Thanks to the guy that made the browser extension! was great!

  5. #5
    Registered User
    Join Date
    Feb 2005
    Location
    Belgium (Europe)
    Posts
    1,352

    Re: Launching browser from python

    Quote Originally Posted by rexwal
    exact command is this
    import e32
    import os

    path = 'z:\\System\\Apps\\Browser\\Browser.app'
    apprun = 'z:\\system\\programs\\apprun.exe'

    def open(url):
    """Opens the webbrowser to the supplied URL"""
    apprun_arg = path + ' "' + url + '"'
    e32.start_exe(apprun,apprun_arg, 1)

    open("http://www.google.co.uk")

    Thanks to the guy that made the browser extension! was great!
    Please use code tag ...
    Code:
    import e32
    import os
    
    path = 'z:\\System\\Apps\\Browser\\Browser.app'
    apprun = 'z:\\system\\programs\\apprun.exe'
    
    def open(url):
    	"""Opens the webbrowser to the supplied URL"""
    	apprun_arg = path + ' "' + url + '"'
            e32.start_exe(apprun,apprun_arg, 1)
    
    open("http://www.google.co.uk")

    Try this also :
    Code:
    import webbrowser
    
    webbrowser.open("http://www.google.co.uk")
    webbrowser.py lib module
    pys60 1.4.5 and 2.0.0, pygame, PyS60 CE on E90 and 5800 !

    Find my pys60 extension modules on cyke64.googlepages.com

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Thumbs up Re: Launching browser from python

    I used Nick Burch's webbrowser.py lib module

  7. #7
    Registered User
    Join Date
    Aug 2006
    Posts
    12

    Re: Launching browser from python

    Cant find apprun.exe...only have apprun.dll

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

    Re: Launching browser from python

    are you running it on a phone or from emulator? I don't have an apprun.dll on my 6680 and what phone are you using?

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

    Smile Re: Launching browser from python

    Lunching the browser from python on 3rd generation s60

    apprun.exe only exists on earlier symbian versions, it used to be required to start an app file (*.app) - but now (v9 onwards) applications are .exe's instead of .app's

    This is how I did it on my Nokia E61 (N80 and E60):

    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!

    Note: I have only been able to start the browser with the give url when the browser settings->Home pages is set to 'Bookmarks'.

    It is also possible to spesify the IAP you want the browser to use:

    url = '4 [url]www.symbian.com 5 # The IAP I wanted was number 5

    Note: In order select IAP with python, the browser settings->Access point must be set to anything but 'Always ask'.
    Last edited by fredrian; 2006-08-25 at 12:07.

  10. #10
    Registered User
    Join Date
    Mar 2008
    Posts
    25

    Re: Launching browser from python

    Hi guys,

    i tried using webbrowser module in my app..

    i get an error no module called collection??

    i can use webbrowser with normal python dist but not on my phone.

    i cannot find info on this collections module anywhere though.

    any ideas??

    thanks

  11. #11
    Regular Contributor
    Join Date
    Dec 2007
    Location
    India
    Posts
    133

    Re: Launching browser from python

    Quote Originally Posted by jkaperi View Post
    Is it possible to create a small python script that launches browser so that it loads my minisite?

    And my second question is; is it possible to dynamically create sis file so that it contains the correct url where pid is dynamic user related parameter?
    Hi,

    Yes, its possible to create a small python script that launches browser.

    Dynamic creation of sis file is a bit complicated, but if you use the source of Py2sis for Symbian phones by Maxim may be you could possible achieve that.
    Kandyfloss

    V 7.0642.0
    18-10-06
    RH-51
    Nokia 7610

  12. #12
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Launching browser from python

    Did anybody succeed in passing url to browser on nokia 6600?
    I only get a white page.

  13. #13
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Unhappy Re: Launching browser from python

    I think it will create problem in 6600.
    AND ONE MORE THINK IS THAT YOU MAY COULD LAUNCH BROWSER BY ONE SCRIPT IN PYTHON..

    OK

Similar Threads

  1. launching wap browser with URL
    By mtg101 in forum Symbian
    Replies: 28
    Last Post: 2008-07-01, 16:01
  2. Open browser from Python
    By gagravarr in forum Symbian
    Replies: 3
    Last Post: 2007-10-07, 05:29
  3. Replies: 14
    Last Post: 2006-08-22, 18:33
  4. Launching Browser
    By taperoni in forum Symbian
    Replies: 4
    Last Post: 2004-10-14, 04:20
  5. launching embedded WAP Browser in 6600?
    By marjola in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2004-01-26, 14:18

Posting Permissions

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