def skip_leading_wsp(f):
    if is_p3k():
        return StringIO("\n".join(x.strip(" ") for x in f.readlines()))
    else:
        return StringIO("\n".join(map(string.strip, f.readlines())))
Works on a file, returns a file-like object
dataset/ETHPy150Open DataDog/datadogpy/datadog/util/config.py/skip_leading_wsp