PATH: //proc/thread-self/root/proc/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: textView.py
"""Simple text browser for IDLE """ from Tkinter import * import tkMessageBox class TextViewer(Toplevel): """A simple text viewer dialog for IDLE """ def __init__(self, parent, title, text, modal=True, _htest=False): """Show the given text in a scrollable window with a 'close' button If modal option set to False, user can interact with other windows, otherwise they will be unable to interact with other windows until the textview window is closed. _htest - bool; change box location when running htest. """ Toplevel.__init__(self, parent) self.configure(borderwidth=5) # place dialog below parent if running htest self.geometry("=%dx%d+%d+%d" % (750, 500, parent.winfo_rootx() + 10, parent.winfo_rooty() + (10 if not _htest else 100))) #elguavas - config placeholders til config stuff completed self.bg = '#ffffff' self.fg = '#000000' self.CreateWidgets() self.title(title) self.protocol("WM_DELETE_WINDOW", self.Ok) self.parent = parent self.textView.focus_set() #key bindings for this dialog self.bind('<Return>',self.Ok) #dismiss dialog self.bind('<Escape>',self.Ok) #dismiss dialog self.textView.insert(0.0, text) self.textView.config(state=DISABLED) self.is_modal = modal if self.is_modal: self.transient(parent) self.grab_set() self.wait_window() def CreateWidgets(self): frameText = Frame(self, relief=SUNKEN, height=700) frameButtons = Frame(self) self.buttonOk = Button(frameButtons, text='Close', command=self.Ok, takefocus=FALSE) self.scrollbarView = Scrollbar(frameText, orient=VERTICAL, takefocus=FALSE, highlightthickness=0) self.textView = Text(frameText, wrap=WORD, highlightthickness=0, fg=self.fg, bg=self.bg) self.scrollbarView.config(command=self.textView.yview) self.textView.config(yscrollcommand=self.scrollbarView.set) self.buttonOk.pack() self.scrollbarView.pack(side=RIGHT,fill=Y) self.textView.pack(side=LEFT,expand=TRUE,fill=BOTH) frameButtons.pack(side=BOTTOM,fill=X) frameText.pack(side=TOP,expand=TRUE,fill=BOTH) def Ok(self, event=None): if self.is_modal: self.grab_release() self.destroy() def view_text(parent, title, text, modal=True): return TextViewer(parent, title, text, modal) def view_file(parent, title, filename, encoding=None, modal=True): try: if encoding: import codecs textFile = codecs.open(filename, 'r') else: textFile = open(filename, 'r') except IOError: tkMessageBox.showerror(title='File Load Error', message='Unable to load file %r .' % filename, parent=parent) except UnicodeDecodeError as err: showerror(title='Unicode Decode Error', message=str(err), parent=parent) else: return view_text(parent, title, textFile.read(), modal) if __name__ == '__main__': import unittest unittest.main('idlelib.idle_test.test_textview', verbosity=2, exit=False) from idlelib.idle_test.htest import run run(TextViewer)
SIMPAN PERUBAHAN