Ejemplo n.º 1
0
    def __init__(self, resource):
        self.is_file = False

        if isinstance(resource, str):
            from resource import ContentObject
            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            self.gff = Gff(resource[0])
Ejemplo n.º 2
0
    def __init__(self, resource):
        self.is_file = False

        if isinstance(resource, str):
            from resource import ContentObject
            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            self.gff = Gff(resource[0])
Ejemplo n.º 3
0
Archivo: item.py Proyecto: rmilne/pynwn
    def __init__(self, resource, instance=False):
        self._scripts = None
        self._vars = None

        self.is_instance = instance
        if not instance:
            if isinstance(resource, str):
                from resource import ContentObject
                co = ContentObject.from_file(resource)
                self.gff = Gff(co)
            else:
                self.container = resource[1]
                self.gff = Gff(resource[0])
        else:
            self.gff = resource
Ejemplo n.º 4
0
    def __init__(self, resource):
        self.is_file = False
        self.reply_cache = None
        self.entry_cache = None

        if isinstance(resource, str):
            from resource import ContentObject
            co = ContentObject.from_file(resource)
            self.gff = Gff(co)
            self.is_file = True
        else:
            self.container = resource[1]
            co = resource[0]
            self.gff = Gff(co)

        self._resref = co.resref