def __init__(self, format, notebook, path=None, document_root_url=None): BaseLinker.__init__(self) if isinstance(format, basestring): format = get_format(format) self.notebook = notebook self.path = path self.document_root_url = document_root_url self._extension = '.' + format.info['extension']
def __init__(self, format, notebook, path=None, document_root_url=None): BaseLinker.__init__(self) if isinstance(format, basestring): format = get_format(format) self.notebook = notebook self.path = path self.document_root_url = document_root_url self.target_dir = None self.target_file = None self._extension = '.' + format.info['extension']
def icon(self, name): if self.target_dir and self.target_file: file = self.target_dir.file('_resources/'+name+'.png') return self._filepath(file, self.target_file.dir) else: return BaseLinker.icon(self, name)
def __init__(self, notebook, path=None): BaseLinker.__init__(self) self.notebook = notebook self.path = path
def icon(self, name): if self.target_dir and self.target_file: file = self.target_dir.file('_resources/' + name + '.png') return self._filepath(file, self.target_file.dir) else: return BaseLinker.icon(self, name)