Nov-13-2016, 01:10 PM
Good day,
having a brain freeze :) How do I set a boolean variable to True inside lambda function? I'm trying to set variable to True on a hotkey(using SystemHotkey lib) :
having a brain freeze :) How do I set a boolean variable to True inside lambda function? I'm trying to set variable to True on a hotkey(using SystemHotkey lib) :
from system_hotkey import SystemHotkey b = False SystemHotkey().register(('control', 'e'), callback = lambda : b = True)But this spits out a syntax error. Also tried:
SystemHotkey().register(('control', 'e'), callback = lambda : exec('b = True'))But it just doesn't work. Any ideas, please?