| Reply | « Previous Thread | Next Thread » |
|
Hi from Spain.
I'm developing a Python Web Browser [like Shotcuts] of my web. For Example,When I press in Foro [Forum],automatically the Browser of the phone will open in my web forum. The problem is that it doesn't work It doesn't open.I think it's problem of "Default.py" file but I don't know..... I show you my "default.py" file in Code & all files of the app. Can you tell me where is the error...? ![]() DOWNLOAD: http://www.mediafire.com/?e2nvqhwdwml Thanks ![]() Code:
#xitopodo
from appuifw import *
import appuifw, e32
xitopodo = [u"Foro",u"Hacks y Servicio Tecnico",u"Varios"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
xitopodo = [u"Portal", u"Foro", u"Registrate", u"Descargas Symbian", u"Juegos Symbian", u"Zona GPS", u"Carbide TPC", u"Acerca de...", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http:/www.thephoneclub.com'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/index.php'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/register.php'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/descargas-symbian/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/juegos/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 5:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-gps/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 6:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/carbide-tpc/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 7:
appuifw.note(u"Aplicacion by xitopodo. Agradecimientos a TPC", "info")
else:
sys.exit()
if index == 1:
xitopodo = [u"Hacks", u"Dudas y Problemas Hacks", u"ST General", u"ST Software", u"ST Firmware", u"Software PC", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/hacks/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/dudas-y-problemas-hacks/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/general/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/software/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/firmware-sistema-operativo/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 5:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/software-pc/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
else:
sys.exit()
if index == 2:
xitopodo = [u"Diseño Grafico", u"Buen Rollito", u"Operadores Telefonia", u"Zona Otras Marcas", u"Zona Iphone", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
elif index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-diseno-grafico/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/buen-rollito/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/operadores-de-telefonia/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-otras-marcas/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-iphone/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
else:
sys.exit()
|
|
Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hello xitopodo
welcome to forum nokia python dibo. ![]() got your idea but it will be great if you tell the forum what errors you are facing in the script rather then giving all the code. ![]() Regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hello xitopodo
i spotted the error its a simple if/else error. The following code works fine for me check it. Code:
# -*- coding: cp1252 -*-
#xitopodo
from appuifw import *
import appuifw, e32
xitopodo = [u"Foro",u"Hacks y Servicio Tecnico",u"Varios"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
xitopodo = [u"Portal", u"Foro", u"Registrate", u"Descargas Symbian", u"Juegos Symbian", u"Zona GPS", u"Carbide TPC", u"Acerca de...", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http:/www.thephoneclub.com'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/index.php'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/register.php'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/descargas-symbian/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/juegos/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 5:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-gps/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 6:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/carbide-tpc/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 7:
appuifw.note(u"Aplicacion by xitopodo. Agradecimientos a TPC", "info")
else:
sys.exit()
if index == 1:
xitopodo = [u"Hacks", u"Dudas y Problemas Hacks", u"ST General", u"ST Software", u"ST Firmware", u"Software PC", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/hacks/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/dudas-y-problemas-hacks/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/general/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/software/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/firmware-sistema-operativo/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 5:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/software-pc/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
else:
sys.exit()
if index == 2:
xitopodo = [u"Diseño Grafico", u"Buen Rollito", u"Operadores Telefonia", u"Zona Otras Marcas", u"Zona Iphone", u"Salir"]
index = appuifw.selection_list(xitopodo, 1)
if index == 0:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-diseno-grafico/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 1:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/buen-rollito/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 2:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/operadores-de-telefonia/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 3:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-otras-marcas/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
elif index == 4:
apprun = 'z:\\system\\programs\\BrowserNG.exe'
browser = 'z:\\System\\Apps\\Browser\\BrowserNG.app'
url = 'http://www.thephoneclub.es/vbulletin/zona-iphone/'
e32.start_exe(apprun, browser + ' "%s"' %url , 1)
else:
sys.exit()
Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
gaba88
Hi mate. I have 2 versions of this app. This version that I posted doesn't open when I pack & install in my phone. And,I think is a problem of the python file [code],or maybe,Is problem that some file like *.rsc.... [download] My second version have 3 files more than my fist version [launcher.py,lib.zip (with 2 files) and a .dll file) and I give this error: http://i44.tinypic.com/iqg26f.jpg The .sis of my version is: http://www.mediafire.com/download.php?zjnfiwnyqk4 EDIT:::: Thanks. Let's my try it ![]() |
|
Gaba88
Thanks....! You're the man...! ^^ It's works perfect ![]() |
|
Join Date: Feb 2008
Posts: 2,543
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
hello xitopodo
great that i was helful to you. ![]() The problem was very basic so i will advice you to go through the basic syntax issues in python. ![]() Regards Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Hi xitopodo.
You should really give a try for Python's "list" data structure and "list comprehension". It would save you lots of those if/else blocks. You should be able to paste the code below to a Python console to see what I mean. Code:
# Create a data structure which contains categories and links
xitopodo = [
[u"Foro",[
(u"Portal", 'http:/www.thephoneclub.com'),
(u"Foro", 'http://www.thephoneclub.es/vbulletin/index.php'),
(u"Registrate", 'http://www.thephoneclub.es/vbulletin/register.php'),
# ...
]],
[u"Hacks y Servicio Tecnico", [
# ...
]],
[u"Varios", [
# ...
]],
]
# Get all categories out from data
[category[0] for category in xitopodo]
# -> [u'Foro', u'Hacks y Servicio Tecnico', u'Varios']
# Get out from data link names in the first category
index = 0
[link[0] for link in xitopodo[index][1]]
# -> [u'Portal', u'Foro', u'Registrate']
# Get out from data link URLs in the first category
[link[1] for link in xitopodo[index][1]]
# -> ['http:/www.thephoneclub.com', 'http://www.thephoneclub.es/vbulletin/index.php', 'http://www.thephoneclub.es/vbulletin/register.php']
-- Aapo Rista http://code.google.com/p/pys60gps/ http://opennetmap.org/ |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Python for S60 1.9.3 released | tvijayan | Python | 40 | 2009-04-03 16:00 |
| Ensymble / application packager, multiple script files + python uni concept project | danburney999 | Python | 1 | 2009-03-12 15:45 |
| nokia 6600,which python files to instal. | orange1949 | Python | 3 | 2008-03-25 15:15 |