PATH: //proc/self/root/proc/thread-self/root/opt/alt/python27/lib64/python2.7/idlelib
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 AutoComplete.py
↓
X
📄 AutoComplete.pyc
↓
X
📄 AutoComplete.pyo
↓
X
📄 AutoCompleteWindow.py
↓
X
📄 AutoCompleteWindow.pyc
↓
X
📄 AutoCompleteWindow.pyo
↓
X
📄 AutoExpand.py
↓
X
📄 AutoExpand.pyc
↓
X
📄 AutoExpand.pyo
↓
X
📄 Bindings.py
↓
X
📄 Bindings.pyc
↓
X
📄 Bindings.pyo
↓
X
📄 CREDITS.txt
↓
X
📄 CallTipWindow.py
↓
X
📄 CallTipWindow.pyc
↓
X
📄 CallTipWindow.pyo
↓
X
📄 CallTips.py
↓
X
📄 CallTips.pyc
↓
X
📄 CallTips.pyo
↓
X
📄 ChangeLog
↓
X
📄 ClassBrowser.py
↓
X
📄 ClassBrowser.pyc
↓
X
📄 ClassBrowser.pyo
↓
X
📄 CodeContext.py
↓
X
📄 CodeContext.pyc
↓
X
📄 CodeContext.pyo
↓
X
📄 ColorDelegator.py
↓
X
📄 ColorDelegator.pyc
↓
X
📄 ColorDelegator.pyo
↓
X
📄 Debugger.py
↓
X
📄 Debugger.pyc
↓
X
📄 Debugger.pyo
↓
X
📄 Delegator.py
↓
X
📄 Delegator.pyc
↓
X
📄 Delegator.pyo
↓
X
📄 EditorWindow.py
↓
X
📄 EditorWindow.pyc
↓
X
📄 EditorWindow.pyo
↓
X
📄 FileList.py
↓
X
📄 FileList.pyc
↓
X
📄 FileList.pyo
↓
X
📄 FormatParagraph.py
↓
X
📄 FormatParagraph.pyc
↓
X
📄 FormatParagraph.pyo
↓
X
📄 GrepDialog.py
↓
X
📄 GrepDialog.pyc
↓
X
📄 GrepDialog.pyo
↓
X
📄 HISTORY.txt
↓
X
📄 HyperParser.py
↓
X
📄 HyperParser.pyc
↓
X
📄 HyperParser.pyo
↓
X
📄 IOBinding.py
↓
X
📄 IOBinding.pyc
↓
X
📄 IOBinding.pyo
↓
X
📁 Icons/
X
📄 IdleHistory.py
↓
X
📄 IdleHistory.pyc
↓
X
📄 IdleHistory.pyo
↓
X
📄 MultiCall.py
↓
X
📄 MultiCall.pyc
↓
X
📄 MultiCall.pyo
↓
X
📄 MultiStatusBar.py
↓
X
📄 MultiStatusBar.pyc
↓
X
📄 MultiStatusBar.pyo
↓
X
📄 NEWS.txt
↓
X
📄 ObjectBrowser.py
↓
X
📄 ObjectBrowser.pyc
↓
X
📄 ObjectBrowser.pyo
↓
X
📄 OutputWindow.py
↓
X
📄 OutputWindow.pyc
↓
X
📄 OutputWindow.pyo
↓
X
📄 ParenMatch.py
↓
X
📄 ParenMatch.pyc
↓
X
📄 ParenMatch.pyo
↓
X
📄 PathBrowser.py
↓
X
📄 PathBrowser.pyc
↓
X
📄 PathBrowser.pyo
↓
X
📄 Percolator.py
↓
X
📄 Percolator.pyc
↓
X
📄 Percolator.pyo
↓
X
📄 PyParse.py
↓
X
📄 PyParse.pyc
↓
X
📄 PyParse.pyo
↓
X
📄 PyShell.py
↓
X
📄 PyShell.pyc
↓
X
📄 PyShell.pyo
↓
X
📄 README.txt
↓
X
📄 RemoteDebugger.py
↓
X
📄 RemoteDebugger.pyc
↓
X
📄 RemoteDebugger.pyo
↓
X
📄 RemoteObjectBrowser.py
↓
X
📄 RemoteObjectBrowser.pyc
↓
X
📄 RemoteObjectBrowser.pyo
↓
X
📄 ReplaceDialog.py
↓
X
📄 ReplaceDialog.pyc
↓
X
📄 ReplaceDialog.pyo
↓
X
📄 RstripExtension.py
↓
X
📄 RstripExtension.pyc
↓
X
📄 RstripExtension.pyo
↓
X
📄 ScriptBinding.py
↓
X
📄 ScriptBinding.pyc
↓
X
📄 ScriptBinding.pyo
↓
X
📄 ScrolledList.py
↓
X
📄 ScrolledList.pyc
↓
X
📄 ScrolledList.pyo
↓
X
📄 SearchDialog.py
↓
X
📄 SearchDialog.pyc
↓
X
📄 SearchDialog.pyo
↓
X
📄 SearchDialogBase.py
↓
X
📄 SearchDialogBase.pyc
↓
X
📄 SearchDialogBase.pyo
↓
X
📄 SearchEngine.py
↓
X
📄 SearchEngine.pyc
↓
X
📄 SearchEngine.pyo
↓
X
📄 StackViewer.py
↓
X
📄 StackViewer.pyc
↓
X
📄 StackViewer.pyo
↓
X
📄 TODO.txt
↓
X
📄 ToolTip.py
↓
X
📄 ToolTip.pyc
↓
X
📄 ToolTip.pyo
↓
X
📄 TreeWidget.py
↓
X
📄 TreeWidget.pyc
↓
X
📄 TreeWidget.pyo
↓
X
📄 UndoDelegator.py
↓
X
📄 UndoDelegator.pyc
↓
X
📄 UndoDelegator.pyo
↓
X
📄 WidgetRedirector.py
↓
X
📄 WidgetRedirector.pyc
↓
X
📄 WidgetRedirector.pyo
↓
X
📄 WindowList.py
↓
X
📄 WindowList.pyc
↓
X
📄 WindowList.pyo
↓
X
📄 ZoomHeight.py
↓
X
📄 ZoomHeight.pyc
↓
X
📄 ZoomHeight.pyo
↓
X
📄 __init__.py
↓
X
📄 __init__.pyc
↓
X
📄 __init__.pyo
↓
X
📄 aboutDialog.py
↓
X
📄 aboutDialog.pyc
↓
X
📄 aboutDialog.pyo
↓
X
📄 config-extensions.def
↓
X
📄 config-highlight.def
↓
X
📄 config-keys.def
↓
X
📄 config-main.def
↓
X
📄 configDialog.py
↓
X
📄 configDialog.pyc
↓
X
📄 configDialog.pyo
↓
X
📄 configHandler.py
↓
X
📄 configHandler.pyc
↓
X
📄 configHandler.pyo
↓
X
📄 configHelpSourceEdit.py
↓
X
📄 configHelpSourceEdit.pyc
↓
X
📄 configHelpSourceEdit.pyo
↓
X
📄 configSectionNameDialog.py
↓
X
📄 configSectionNameDialog.pyc
↓
X
📄 configSectionNameDialog.pyo
↓
X
📄 dynOptionMenuWidget.py
↓
X
📄 dynOptionMenuWidget.pyc
↓
X
📄 dynOptionMenuWidget.pyo
↓
X
📄 extend.txt
↓
X
📄 help.html
↓
X
📄 help.py
↓
X
📄 help.pyc
↓
X
📄 help.pyo
↓
X
📄 help.txt
↓
X
📄 idle.py
↓
X
📄 idle.pyc
↓
X
📄 idle.pyo
↓
X
📄 idle.pyw
↓
X
📁 idle_test/
X
📄 idlever.py
↓
X
📄 idlever.pyc
↓
X
📄 idlever.pyo
↓
X
📄 keybindingDialog.py
↓
X
📄 keybindingDialog.pyc
↓
X
📄 keybindingDialog.pyo
↓
X
📄 macosxSupport.py
↓
X
📄 macosxSupport.pyc
↓
X
📄 macosxSupport.pyo
↓
X
📄 rpc.py
↓
X
📄 rpc.pyc
↓
X
📄 rpc.pyo
↓
X
📄 run.py
↓
X
📄 run.pyc
↓
X
📄 run.pyo
↓
X
📄 tabbedpages.py
↓
X
📄 tabbedpages.pyc
↓
X
📄 tabbedpages.pyo
↓
X
📄 textView.py
↓
X
📄 textView.pyc
↓
X
📄 textView.pyo
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: PathBrowser.py
import os import sys import imp from idlelib.TreeWidget import TreeItem from idlelib.ClassBrowser import ClassBrowser, ModuleBrowserTreeItem from idlelib.PyShell import PyShellFileList class PathBrowser(ClassBrowser): def __init__(self, flist, _htest=False): """ _htest - bool, change box location when running htest """ self._htest = _htest self.init(flist) def settitle(self): "Set window titles." self.top.wm_title("Path Browser") self.top.wm_iconname("Path Browser") def rootnode(self): return PathBrowserTreeItem() class PathBrowserTreeItem(TreeItem): def GetText(self): return "sys.path" def GetSubList(self): sublist = [] for dir in sys.path: item = DirBrowserTreeItem(dir) sublist.append(item) return sublist class DirBrowserTreeItem(TreeItem): def __init__(self, dir, packages=[]): self.dir = dir self.packages = packages def GetText(self): if not self.packages: return self.dir else: return self.packages[-1] + ": package" def GetSubList(self): try: names = os.listdir(self.dir or os.curdir) except os.error: return [] packages = [] for name in names: file = os.path.join(self.dir, name) if self.ispackagedir(file): nn = os.path.normcase(name) packages.append((nn, name, file)) packages.sort() sublist = [] for nn, name, file in packages: item = DirBrowserTreeItem(file, self.packages + [name]) sublist.append(item) for nn, name in self.listmodules(names): item = ModuleBrowserTreeItem(os.path.join(self.dir, name)) sublist.append(item) return sublist def ispackagedir(self, file): if not os.path.isdir(file): return False init = os.path.join(file, "__init__.py") return os.path.exists(init) def listmodules(self, allnames): modules = {} suffixes = imp.get_suffixes() sorted = [] for suff, mode, flag in suffixes: i = -len(suff) for name in allnames[:]: normed_name = os.path.normcase(name) if normed_name[i:] == suff: mod_name = name[:i] if mod_name not in modules: modules[mod_name] = None sorted.append((normed_name, name)) allnames.remove(name) sorted.sort() return sorted def _path_browser(parent): # htest # flist = PyShellFileList(parent) PathBrowser(flist, _htest=True) parent.mainloop() if __name__ == "__main__": from unittest import main main('idlelib.idle_test.test_pathbrowser', verbosity=2, exit=False) from idlelib.idle_test.htest import run run(_path_browser)
SIMPAN PERUBAHAN