Heads fried please help
#1
so i have this it is a bit longer another 250 longer but if not returning the letter just still the number

Code:
def country():
    dialog = xbmcgui.Dialog()
    countries = ['Afghanistan','Albania','Algeria','American Samoa']
    f=dialog.select('Please Select Country', countries)
    if f == '0':
            return  'AF'
    elif f == '1':    
            return  'AL'
    elif f == '2':    
            return  'DZ'
    elif f == '3':    
            return  'AS'
    elif f == '4':    
            return  'AD'
        print '=======================THIS IS F=================   '+str(f)

this is f

Code:
=======================THIS IS F=================   229


and in my default py i have this but it doesnt pull from my settings.py


Code:
country=settings.country()
print '======================COUNTRY=========     '+str(country)
city = ''
keyboard = xbmc.Keyboard('', 'Input Your City')
keyboard.doModal()
if keyboard.isConfirmed():
    city = keyboard.getText()
    if city == None:
        return False
values ={"country":"%s","city":"%s"}%(country,city)

this is country

Code:
======================COUNTRY=========     None


my head is in a spin i must be over looking something
Reply
#2
I am sure f is int in "f=dialog.select('Please Select Country', countries)"

try "if f == 0:"
Reply
#3
thanks worked a treat
Reply

Logout Mark Read Team Forum Stats Members Help
Heads fried please help0