def OnBreakInto(self, event): for node in self.getNodesForSelection(self.list.getMultiSelection()): props = node.properties zc = ZopeConnection() zc.connect(props['host'], props['httpport'], props['username'], props['passwd']) start_new_thread(self.breakpointInBackground, (zc, ))
def OnBreakInto(self, event): for node in self.getNodesForSelection(self.list.getMultiSelection()): props = node.properties zc = ZopeConnection() zc.connect(props['host'], props['httpport'], props['username'], props['passwd']) start_new_thread(self.breakpointInBackground, (zc,))
class ZopeEClip(ExplorerNodes.ExplorerClipboard): def __init__(self, globClip, props): ExplorerNodes.ExplorerClipboard.__init__(self, globClip) self.clipRef = '' self.props = props self.zc = ZopeConnection() self.zc.connect(props['host'], props['httpport'], props['username'], props['passwd']) def callAndSetRef(self, objpath, method, nodes): names = [n.name for n in nodes] mime, res = self.zc.call(objpath, method, ids = names) self.clipRef = mime.get('Set-Cookie').split('"')[1] def clipCut(self, node, nodes): ExplorerNodes.ExplorerClipboard.clipCut(self, node, nodes) self.callAndSetRef(node.resourcepath, 'manage_cutObjects', nodes) def clipCopy(self, node, nodes): ExplorerNodes.ExplorerClipboard.clipCopy(self, node, nodes) self.callAndSetRef(node.resourcepath, 'manage_copyObjects', nodes) # def clipPaste(self, node): # ExplorerNodes.ExplorerClipboard.clipPaste(self, node) def clipPaste_ZopeEClip(self, node, nodes, mode): mime, res = self.zc.call(node.resourcepath, 'manage_pasteObjects', cb_copy_data = self.clipRef) def clipPaste_FileSysExpClipboard(self, node, nodes, mode): for file in nodes: if file.isDir(): node.newFolder(file.name) folderNode = node.createChildNode('Folder', file.name) self.clipPaste_FileSysExpClipboard(folderNode, file.openList(), mode) else: node.uploadFromFS(file)
def __init__(self, globClip, props): ExplorerNodes.ExplorerClipboard.__init__(self, globClip) self.clipRef = '' self.props = props self.zc = ZopeConnection() self.zc.connect(props['host'], props['httpport'], props['username'], props['passwd'])
class ZopeEClip(ExplorerNodes.ExplorerClipboard): def __init__(self, globClip, props): ExplorerNodes.ExplorerClipboard.__init__(self, globClip) self.clipRef = '' self.props = props self.zc = ZopeConnection() self.zc.connect(props['host'], props['httpport'], props['username'], props['passwd']) def callAndSetRef(self, objpath, method, nodes): names = [n.name for n in nodes] mime, res = self.zc.call(objpath, method, ids=names) self.clipRef = mime.get('Set-Cookie').split('"')[1] def clipCut(self, node, nodes): ExplorerNodes.ExplorerClipboard.clipCut(self, node, nodes) self.callAndSetRef(node.resourcepath, 'manage_cutObjects', nodes) def clipCopy(self, node, nodes): ExplorerNodes.ExplorerClipboard.clipCopy(self, node, nodes) self.callAndSetRef(node.resourcepath, 'manage_copyObjects', nodes) # def clipPaste(self, node): # ExplorerNodes.ExplorerClipboard.clipPaste(self, node) def clipPaste_ZopeEClip(self, node, nodes, mode): mime, res = self.zc.call(node.resourcepath, 'manage_pasteObjects', cb_copy_data=self.clipRef) def clipPaste_FileSysExpClipboard(self, node, nodes, mode): for file in nodes: if file.isDir(): node.newFolder(file.name) folderNode = node.createChildNode('Folder', file.name) self.clipPaste_FileSysExpClipboard(folderNode, file.openList(), mode) else: node.uploadFromFS(file)
def callControlPanelMethod(self, props, meth): zc = ZopeConnection() zc.connect(props['host'], props['httpport'], props['username'], props['passwd']) zc.call('/Control_Panel', meth)