slang inn en liten fil med en rudimentær boksøkefunksjon
This commit is contained in:
@@ -122,7 +122,7 @@ def select_from_list(list, attributes=False, item_name=""):
|
||||
answer = raw_input(str("Found one %s: %s. Use this? [y]/n> " %(item_name,' '.join([eval("list[0]."+attribute) for attribute in attributes]))))
|
||||
else:
|
||||
answer = raw_input(str("Found one %s: %s. Use this? [y]/n> " %(item_name,list[0])))
|
||||
if answer in ['yes', 'y']:
|
||||
if answer in ['yes', 'y', '']:
|
||||
return list[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user