

def get_program(view):
    plat = sublime.platform()
    prog = sget('prog')
    if prog:
        return plat
    defaults = sget('defaults')
    pt = (view.sel()[0].begin() if (len(view.sel()) > 0) else 0)
    for d in defaults:
        match_platform = (plat == d.get('platform', plat))
        scopes = d.get('scopes', None)
        match_scopes = ((not scopes) or any([(view.score_selector(pt, s) > 0) for s in scopes]))
        if (match_platform and match_scopes and ('prog' in d)):
            return d.get('prog')
    return None

dataset/ETHPy150Open randy3k/SendTextPlus/textsender.py get_program/VarMisuse@31/38 `prog`->`plat`