You can use awk to change the field separator in a data stream:
$ cat foo
a,b,c,d,e,f
a,b,c,d,e,f
$ awk 'BEGIN { FS = ","; OFS = ".."; } { $1 = $1; print }' foo
a..b..c..d..e..f
a..b..c..d..e..f
(You just have to touch one of the fields to get it to process the line.)
awkcommandsfieldsparsingshell
If you need to tell a python framework where your templates, etc. are located, it helps to determine the location of the current module.
BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__FILE__), '..')) TEMPLATES = os.path.join(BASE_PATH, 'templates')
Assuming you're running this code in /path/to/module.py, BASE_PATH will be set to /path. Other os.path tricks can be used to dynamically set paths in this way.
locationosparsingpathpython