def __init__(self, source):
    """
    Create a new template and compile it to bytecode.
    
    source - an open file or a string containing the template text.
    """
    if hasattr(source,'read'):
      filename = source.name
      source = source.read()
    else:
      filename = "<string>"
    self.code = TemplateCompiler().compile(source, filename)

    Create a new template and compile it to bytecode.
    
    source - an open file or a string containing the template text.
    
recipes/Python/440629_Good_enough_templating/recipe-440629.py