def __init__(self, filename, width=None, height=None, kind='direct',
                                 mask=None, lazy=True, srcinfo=None):
        client, uri = srcinfo
        cache = self.source_filecache.setdefault(client, {})
        pdffname = cache.get(filename)
        if pdffname is None:
            tmpf, pdffname = tempfile.mkstemp(suffix='.pdf')
            os.close(tmpf)
            client.to_unlink.append(pdffname)
            cache[filename] = pdffname
            cmd = [progname, os.path.abspath(filename), '-A', pdffname]
            try:
                subprocess.call(cmd)
            except __HOLE__, e:
                log.error("Failed to run command: %s", ' '.join(cmd))
                raise
            self.load_xobj((client, pdffname))

        pdfuri = uri.replace(filename, pdffname)
        pdfsrc = client, pdfuri
        VectorPdf.__init__(self, pdfuri, width, height, kind, mask, lazy, pdfsrc)
dataset/ETHPy150Open rst2pdf/rst2pdf/rst2pdf/extensions/inkscape_r2p.py/InkscapeImage.__init__