def asciikeys(adict):
    return dict((k.encode('ascii'), v) for k, v in adict.items())
ensure a dictionary has ASCII keys (and so can be an **kwargs)
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/asciikeys