except ValueError: files.append(file.filename) return files def updateFilelists(self): zf = self.ArchiveClass(self.resourcepath, 'r') try: self.compression = zf.compression self.allFiles = zf.infolist() self.allFileNames = [fl.filename for fl in self.allFiles] finally: zf.close() EditorHelper.imgZipFileModel = \ EditorHelper.addPluginImgs('Images/Modules/ZipFile.png') class ZipFileModel(EditorModels.EditorModel): modelIdentifier = 'ZipFile' defaultName = 'zip' bitmap = 'ZipFile.png' imgIdx = EditorHelper.imgZipFileModel ext = '.zip' def uriSplitZip(filename, zipfile, zipentry): return 'zip', zipfile, zipentry, filename def findZipExplorerNode(category, respath, transports):
try: files.index(file.filename) except ValueError: files.append(file.filename) return files def updateFilelists(self): zf = self.ArchiveClass(self.resourcepath, 'r') try: self.compression = zf.compression self.allFiles = zf.infolist() self.allFileNames = [fl.filename for fl in self.allFiles] finally: zf.close() EditorHelper.imgZipFileModel = \ EditorHelper.addPluginImgs('Images/Modules/ZipFile.png') class ZipFileModel(EditorModels.EditorModel): modelIdentifier = 'ZipFile' defaultName = 'zip' bitmap = 'ZipFile.png' imgIdx = EditorHelper.imgZipFileModel ext = '.zip' def uriSplitZip(filename, zipfile, zipentry): return 'zip', zipfile, zipentry, filename def findZipExplorerNode(category, respath, transports): zf = ZipFileNode(os.path.basename(category), category, None, -1, None, None) zf.openList() return zf.getNodeFromPath(respath)
os.chdir(cwd) del sys.path[0] except Exception, err: print str(err) return None def getWxPyDemoTree(): Main = importFromWxPyDemo('Main') if Main: return Main._treeList else: return [] EditorHelper.imgWxPythonDemo = EditorHelper.addPluginImgs('Images/wxPythonDemo.png') class SkipViewSignal(Exception): """ Raised when the demo is not docked """ class wxPythonDemoView(wx.Panel, EditorViews.EditorView, EditorViews.CloseableViewMix): viewName = tabName = 'Demo' viewTitle = _('Demo') def __init__(self, parent, model): wx.Panel.__init__(self, parent, -1) EditorViews.CloseableViewMix.__init__(self) EditorViews.EditorView.__init__(self, model, actions=self.closingActionItems) self.demoCtrl = None
class PseudoFileOutTC(Utils.PseudoFile): tags = 'stderr' def write(self, s): self.output.AppendText(s) if echo: sys.__stdout__.write(s) class PseudoFileErrTC(Utils.PseudoFile): tags = 'stdout' def write(self, s): self.output.AppendText(s) if echo: sys.__stderr__.write(s) #------------------------------------------------------------------------------- EditorHelper.imgPyCrust = EditorHelper.addPluginImgs('Images\Editor\PyCrust.png') class PyCrustShellEditor(wx.SplitterWindow): def __init__(self, parent, wId): wx.SplitterWindow.__init__(self, parent, wId) from wx.py.crust import Shell, Filling # XXX argh! PyCrust records the About box pseudo file objs from # XXX sys.in/err/out o, i, e = sys.stdout, sys.stdin, sys.stderr sys.stdout, sys.stdin, sys.stderr = \ sys.__stdout__, sys.__stdin__, sys.__stderr__ try: self.shellWin = Shell(self, -1) finally:
os.chdir(cwd) del sys.path[0] except Exception, err: print str(err) return None def getWxPyDemoTree(): Main = importFromWxPyDemo('Main') if Main: return Main._treeList else: return [] EditorHelper.imgWxPythonDemo = EditorHelper.addPluginImgs( 'Images/wxPythonDemo.png') class SkipViewSignal(Exception): """ Raised when the demo is not docked """ class wxPythonDemoView(wx.Panel, EditorViews.EditorView, EditorViews.CloseableViewMix): viewName = tabName = 'Demo' viewTitle = _('Demo') def __init__(self, parent, model): wx.Panel.__init__(self, parent, -1) EditorViews.CloseableViewMix.__init__(self) EditorViews.EditorView.__init__(self,