You Are Here:

Community: Developer Discussion Boards

#1 Old Launching browser from python - 2006-07-04, 20:36

Join Date: Mar 2003
Posts: 4
jkaperi
Offline
Registered User
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
Reply With Quote

#2 Old Re: Launching browser from python - 2006-07-05, 12:41

Join Date: Mar 2003
Posts: 4
jkaperi
Offline
Registered User
Problem solved but I think I stick to midp 2.0 midlets to do the trick...
Reply With Quote

#3 Old Re: Launching browser from python - 2006-07-21, 09:54

Join Date: Nov 2004
Posts: 105
rexwal
Offline
Regular Contributor
so how did you launch the browser with a url?
Reply With Quote

#4 Old Re: Launching browser from python - 2006-07-24, 11:34

Join Date: Nov 2004
Posts: 105
rexwal
Offline
Regular Contributor
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!
Reply With Quote

#5 Old Re: Launching browser from python - 2006-07-30, 05:11

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
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,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 !

pys60 extension modules on http://cyke64.googlepages.com/
Reply With Quote

#6 Old Thumbs up Re: Launching browser from python - 2006-08-03, 19:09

Join Date: Mar 2003
Posts: 4
jkaperi
Offline
Registered User
I used Nick Burch's webbrowser.py lib module
Reply With Quote

#7 Old Re: Launching browser from python - 2006-08-19, 00:03

Join Date: Aug 2006
Posts: 12
rockzZ25
Offline
Registered User
Cant find apprun.exe...only have apprun.dll
Reply With Quote

#8 Old Re: Launching browser from python - 2006-08-21, 12:41

Join Date: Nov 2004
Posts: 105
rexwal
Offline
Regular Contributor
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?
Reply With Quote

#9 Old Smile Re: Launching browser from python - 2006-08-24, 18:12

Join Date: Aug 2006
Posts: 1
fredrian
Offline
Registered User
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 13:07.
Reply With Quote

#10 Old Re: Launching browser from python - 2008-03-22, 21:01

Join Date: Mar 2008
Posts: 25
ComplexT
Offline
Registered User
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
Reply With Quote

#11 Old Re: Launching browser from python - 2008-03-23, 06:30

Join Date: Dec 2007
Posts: 134
Location: India
kandyfloss's Avatar
kandyfloss
Offline
Regular Contributor
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
Reply With Quote

#12 Old Re: Launching browser from python - 2008-11-10, 20:06

Join Date: Mar 2003
Posts: 564
cassioli's Avatar
cassioli
Offline
Super Contributor
Did anybody succeed in passing url to browser on nokia 6600?
I only get a white page.
Reply With Quote

#13 Old Unhappy Re: Launching browser from python - 2008-11-15, 11:34

Join Date: Oct 2008
Posts: 203
Send a message via Yahoo to rahulvala
rahulvala's Avatar
rahulvala
Offline
Regular Contributor
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
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
launching wap browser with URL mtg101 General Symbian C++ 28 2008-07-01 17:01
Open browser from Python gagravarr Python 3 2007-10-07 06:29
Launching a Python script (with arguments) from Flash? bouvin Python 14 2006-08-22 19:33
Launching Browser taperoni General Symbian C++ 4 2004-10-14 05:20
launching embedded WAP Browser in 6600? marjola Symbian Networking & Messaging 0 2004-01-26 15:18

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