Example #1
0
def tkbtn(fm, list):
    for btn in list:
        ##command指令对接的方法,不用lambda,则会立即执行,用了lambda,则会固话for循环的最后一个值,使用lambda name=name:def(name),来动态匹配
        tk.Button(fm, text=btn,
                  command=lambda btn=btn: sendMail(btn)).pack(side='left',
                                                              fill='x',
                                                              expand='yes')
    return tk.Button
Example #2
0
def sched(option):
    day = getSvrOption('SchedulerDay', option)
    hour = getSvrOption('SchedulerHour', option)
    minute = getSvrOption('SchedulerMinute', option)
    scheduler = BackgroundScheduler()
    perTask = lambda option=option: sendMail(option)
    # perTask =lambda option=option:print(option)
    sched = scheduler.add_job(perTask,
                              'cron',
                              day_of_week=day,
                              hour=hour,
                              minute=minute)
    return sched
Example #3
0
 def month():
     sendMail('每月')
Example #4
0
 def weeklyThird():
     sendMail('每周')
Example #5
0
 def weeklySec():
     sendMail('每周已核对')
Example #6
0
 def weeklyFirst():
     sendMail('每周提前')
Example #7
0
 def dailyThird():
     sendMail('每日')
Example #8
0
 def dailySec():
     sendMail('每日提前推送')
Example #9
0
 def dailyFirst():
     sendMail('每日优先估值')