def get_content(self, context=None):
if self.is_file:<EOL><INDENT>path = self.content<EOL>if self.is_template_path and context:<EOL><INDENT>path = string.Template(path).safe_substitute(<EOL>context.get_values())<EOL><DEDENT>data = None<EOL>with open(path, '<STR_LIT:r>') as f:<EOL><INDENT>data = f.read()<EOL><DEDENT>if self.is_template_content and context:<EOL><INDENT>return string.Template(data).safe_substitute(context.get_values())<EOL><DEDENT>else:<EOL><INDENT>return data<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if self.is_template_content and context:<EOL><INDENT>return safe_substitute_unicode_template(self.content, context.get_values())<EOL><DEDENT>else:<EOL><INDENT>return self.content<EOL><DEDENT><DEDENT>
Does all context binding and pathing to get content, templated out