def fix_varname(s):
        t = str(s).translate(BAD_FILETABLE)
        while t.endswith('_'): t = t[:-1]
        return t
fix string to be a 'good' variable name.
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/fix_varname