main.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:glucometer 作者: johnyburd 项目源码 文件源码
def submit(self):
        ids = self.ids
        time = ids.time.text
        date = ids.date.text
        bg = ids.bg.text
        carbs = ids.carbs.text
        bolus = ids.bolus.text
        notes = ids.notes.text
        if time != '' and date != '' and (bg != '' or carbs != '' or bolus != '' or notes != ''):
            if bg == '':
                bg = 0
            if carbs == '':
                carbs = 0
            if bolus == '':
                bolus = 0
            if notes == '':
                notes = ' '
            datetime = date + ' ' + time
            self.dm.new_entry(datetime, bg, carbs, bolus, notes)
            Clock.schedule_once(datascreen.refresh, 2)
            self.dismiss()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号