#!/usr/bin/env python
-#-*- coding:utf-8 -*-
+# -*- coding:utf-8 -*-
# Copyright (C) 2010-2013 CEA/DEN
#
# This library is free software; you can redistribute it and/or
import string
+
class MyTemplate(string.Template):
- delimiter = '¤'
+ delimiter = "¤"
+
def substitute(template_file, subst_dic):
- template = open(template_file, 'r')
+ template = open(template_file, "r")
template = MyTemplate(template.read())
return template.safe_substitute(subst_dic)
-