def winpath(d):
    if d.startswith('//'): d = d[1:]
    d = d.replace('/','\\')
    if not d.endswith('\\'): d = '%s\\' % d
    return d
A filter that batches items. It works pretty much like `slice`
dataset/ETHPy150Open xraypy/xraylarch/plugins/io/fileutils.py/winpath--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/appengine-flask-skeleton/lib/jinja2/filters.py/do_batch