def price_check(v, vstatus):
if vstatus.cur_selection[1] == '8':
- v.display(center('SEE COKE'))
+ args = ('dispense', 'iteminfo', 'coke:' + vstatus.cur_selection[0])
+ info, unused = Popen(args, close_fds=True, stdout=PIPE).communicate()
+ dollarprice = re.match("\s*[a-z]+:\d+\s+(\d+\.\d\d)\s+([^\n]+)", info).group(1)
else:
# first see if it's a named slot
try:
except:
price, shortname, name = get_snack( '--' )
dollarprice = "$%.2f" % ( price / 100.0 )
- v.display(vstatus.cur_selection+' - %s'%dollarprice)
+ v.display(vstatus.cur_selection+' - %s'%dollarprice)
def handle_getting_pin_key(state, event, params, v, vstatus):