R. David Murray <[email protected]> added the comment:
Python has had a way to do this since python 2.4:
>>> from string import Template
>>> fullPath =
Template("$ROOT/${SUBDIR/some/path").substitute(dict(ROOT='/users/geof',
SUBDIR='subdir'))
>>> fullPath
'/users/geof/subdir/some/path'
----------
components: +Library (Lib) -Extension Modules
nosy: +r.david.murray
resolution: -> rejected
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue1748960>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com