def from_file(cls, file):
        """
        loads a template from a file. `file` can be either a string, specifying
        a filename, or a file-like object, supporting read() directly
        """
        if isinstance(file, basestring):
            file = open(file)
        return cls(file.read())

        loads a template from a file. `file` can be either a string, specifying
        a filename, or a file-like object, supporting read() directly
        
recipes/Python/496702_Templite/recipe-496702.py