Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- """___________________
- Lunch Picker
- Version_0.4
- cwisbg
- Brandon Gillespie
- 1/30/2012
- ______________________
- """
- from datetime import datetime
- import random as r
- times = str(datetime.now()) # Get system time/date
- weekDays = ['Monday','Tuesday','Wednesday','Thursday','Friday']
- title = "You will have"
- dataPath = "E:/"
- # Get lunch ideas
- openlunchIdeas = open("{0}lunchIdeas.txt".format(dataPath), "r")
- lunchIdeas = openlunchIdeas.readlines()
- # Make used choices file
- openlunchData = open("{0}lunchData.txt".format(dataPath), "a+")
- lunchData = openlunchData.readlines()
- # Make Lunch Menu
- openMenu = open("{0}lunchMenu.txt".format(dataPath), "w")
- menu = []#openMenu.readlines()
- x = 0 # Lunch data inc
- z = 0 # Lunch Ideas inc
- if len(lunchData) == 0:
- pass
- else:
- for i in lunchData: # sort thouth items in list
- if x == len(lunchData): #to reset the cycle of x so we dont go over lunchData indexs
- x = 0
- for l in lunchIdeas: # check for matches
- if l == lunchData[z]:
- currentLunchList.remove(i)
- z += 1
- x += 1
- """
- currentLunchList = readLunchIdeas
- if len(lunchData) == 0:
- for i in range(0,len(weekDays):
- rando = r.randint(len(readLunchIdeas))
- menu.append(readLunchIdeas[rando])
- else:
- for i in range(0,len(weekDays):
- rando = r.randint(len(currentLunchList))
- menu.append(readLunchIdeas[rando])
- #print menu
- openlunchData.write(i)
- openMenu.write(i)
- """
- openlunchIdeas.close()
- openlunchData .close()
- openMenu.close()
- """
- Lunch List:
- pbj sandwich
- special sandwich
- soup
- noodles
- hot dogs
- pizza
- Cheese Stake sandwich
- chicken wrap
- tacos
- taco soup
- salad
- buritto
- fried rice
- chinese
- meat ball sandwich
- roast beef roll
- roast beef sandwich
- rando from safeway
- rando from whole foods
- rando from kings
- gas station surprise!
- ham and cheese sandwich
- """
Advertisement
Add Comment
Please, Sign In to add comment