def dmenu_fetch(inputstr):
    t = TemporaryFile()
    t.write(bytes(inputstr, 'UTF-8'))
    t.seek(0)
    dmenu_run = subprocess.Popen(['dmenu', '-b'], stdout=subprocess.PIPE, stdin=t)
    output = dmenu_run.communicate()[0].decode().strip()
    return output
def dmenu_fetch(inputstr):
    t = TemporaryFile()
    t.write(bytes(inputstr, 'UTF-8'))
    t.seek(0)
    dmenu_run = subprocess.Popen(['dmenu', '-b'], stdout=subprocess.PIPE, stdin=t)
    output = dmenu_run.communicate()[0].decode().strip()
    return output