'Creates a template object from compiled code and the globals.  This
is used by the loaders and environment to create a template object.'

@classmethod
def from_code(cls, environment, code, globals, uptodate=None):

    namespace = {'environment': environment, '__file__': code.co_filename}
    exec code in namespace
    rv = cls._from_namespace(environment, namespace, globals)
    rv._uptodate = uptodate
    return rv
