Mercurial > piecrust2
view tests/pathutil.py @ 814:aca04e175488
data: Allow page generators to have an associated data provider
author | Ben Artin <ben@artins.org> |
---|---|
date | Wed, 28 Dec 2016 01:27:02 -0500 |
parents | a2d283d1033d |
children |
line wrap: on
line source
import os def slashfix(path): if path is None: return None if isinstance(path, str): return path.replace('/', os.sep) fixed = [] for p in path: fixed.append(p.replace('/', os.sep)) return fixed