| Reply | « Previous Thread | Next Thread » |
|
OK so heres the problem I'm facing. I am trying to make a program that takes a lit of ingredients that you enter into a field and it processes them and spits back out a list of drinks you can make. I can't seem to figure out how to make the search function work. If anyone has any ideas on how to make this work please! Please! dont hold them back. Also, I am somewhat new to python so if you could give a general breakdown of the script it would save me alot of time.
|
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Hi and welcome to the Forum.
From what I understand you want to have a list of ingredients with the ability to search for specific ones in the list. If so, you could use a selection list: Code:
import appuifw, e32 #Define the exit function and assign it to the right softkey def quit():app_lock.signal() appuifw.app.exit_key_handler=quit #First create the sequence of ingredients (must be unicode) a=[u"Alcohol",u"Water",u"Vodka",u"Lemon juice"] #Now display the list and store the index of the selected option in a variable (i, for example) i=appuifw.selection_list(a, search_field=1) #You can store the ingredient in a new list, for processing and generating the drink name b=[] b.append(a[i]) app_lock=e32.Ao_lock() app_lock.wait() Hope that helps ![]() |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Please help installing Python libraries on S60 | ericroijen | Python | 11 | 2009-07-18 11:43 |
| [announce] PyUIQ. Python for UIQ 2.1 and 3.x | OscarBernabeu | Python | 35 | 2008-01-17 10:12 |
| [announce] the first Mobile Python book is now available ! | cyke64 | Python | 1 | 2008-01-08 10:58 |
| [announce] Mobile Python book soon in Sept 2007 ! | cyke64 | Python | 11 | 2007-10-03 20:46 |
| [announce] Lightblue - cross-platform Python Bluetooth API | buzz111 | Python | 32 | 2007-07-19 08:43 |