Advertisement
here2share

# s60_shopping_list.py

May 24th, 2016
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # s60_shopping_list.py
  2.  
  3. import appuifw
  4. import messaging
  5.  
  6. items = u'''
  7. blueberry yogurt
  8. bananas
  9. tangerines
  10. apple juice
  11. orange juice
  12. peach juice
  13. french vanilla milkshake
  14. lemonade @$1.00
  15. smoothie - oasis : b,c,p
  16. breath mints - excel : polar ice
  17. vitamin a
  18. thiamine (b1)
  19. riboflavin (b2)
  20. niacin (b3)
  21. pantothenic acid (b5)
  22. vitamin b6
  23. biotin (b7)
  24. folic acid (b9)
  25. vitamin b12
  26. vitamin c
  27. vitamin d
  28. vitamin e
  29. vitamin k
  30. foamy handsoap
  31. facial wash
  32. bodywash - 24h protection
  33. deorderant - 24h protection
  34. toothpaste - colgate
  35. dishwashing liquid
  36. aluminum foil
  37. plastic cups
  38. all-purpose cleaner
  39. scrub pads
  40. bandages
  41. resealable bags
  42. cling wrap
  43. toothpick flosses
  44. mouthwash - scope
  45. skincare lotion
  46. massaging oil
  47. scotch tape
  48. duct tape
  49. garbage bags
  50. laundry soap
  51. air freshener
  52. toilet paper
  53. toilet puck
  54. disenfectant
  55. q-tips
  56. paper towels
  57. kleenex
  58. body towels
  59. bleach
  60. socks
  61. underwear
  62. dress shoes
  63. running shoes
  64. winter boots
  65. brita water filter
  66. flavor crystals
  67. tea
  68. apples
  69. salmon
  70. tuna
  71. turkey
  72. whole-grain bread
  73. cereal
  74. oatmeal
  75. pasta
  76. milk
  77. '''.title().split('\n')[1:-1]
  78.  
  79. choices = appuifw.multi_selection_list(items,'checkbox',1)
  80.  
  81. if choices:
  82.     items_to_buy = []
  83.     for x in choices:
  84.         items_to_buy.append(items[x])
  85.  
  86.     shoppinglist = "\nShopping List:\n\n"+"\n\n".join(items_to_buy)
  87.     print "Sending SMS... " + shoppinglist
  88.     appuifw.note(u"Sending SMS")
  89.     messaging.sms_send("+15551234567", shoppinglist)
  90.     appuifw.note(u"Shopping List Sent")
  91. else:
  92.     appuifw.note(u"No Item Has Been Selected")
  93.     print "Shopping List Cancelled"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement