f90d529229
The problem was that an exception can occur in the text.get() call or in the write() call, when the text buffer contains non-ASCII characters. This causes the previous contents of the file to be lost. The provisional fix is to call str(self.text.get(...)) *before* opening the file, so that if the exception occurs, we never open the file. Two orthogonal better solutions have to wait for policy decisions: 1. We could try to encode the data as Latin-1 or as UTF-8; but that would require IDLE to grow a notion of file encoding which requires more thought. 2. We could make backups before overwriting a file. This requires more thought because it needs to be fast and cross-platform and configurable. |
||
---|---|---|
.. | ||
Icons | ||
AutoExpand.py | ||
AutoIndent.py | ||
Bindings.py | ||
CallTipWindow.py | ||
CallTips.py | ||
ChangeLog | ||
ClassBrowser.py | ||
ColorDelegator.py | ||
Debugger.py | ||
Delegator.py | ||
EditorWindow.py | ||
FileList.py | ||
FormatParagraph.py | ||
FrameViewer.py | ||
GrepDialog.py | ||
IOBinding.py | ||
IdleConf.py | ||
IdleHistory.py | ||
MultiScrolledLists.py | ||
MultiStatusBar.py | ||
NEWS.txt | ||
ObjectBrowser.py | ||
OldStackViewer.py | ||
OutputWindow.py | ||
ParenMatch.py | ||
PathBrowser.py | ||
Percolator.py | ||
PyParse.py | ||
PyShell.py | ||
README.txt | ||
RemoteInterp.py | ||
ReplaceDialog.py | ||
ScriptBinding.py | ||
ScrolledList.py | ||
SearchBinding.py | ||
SearchDialog.py | ||
SearchDialogBase.py | ||
SearchEngine.py | ||
Separator.py | ||
StackViewer.py | ||
TODO.txt | ||
ToolTip.py | ||
TreeWidget.py | ||
UndoDelegator.py | ||
WidgetRedirector.py | ||
WindowList.py | ||
ZoomHeight.py | ||
__init__.py | ||
config-mac.txt | ||
config-unix.txt | ||
config-win.txt | ||
config.txt | ||
eventparse.py | ||
extend.txt | ||
help.txt | ||
idle | ||
idle.bat | ||
idle.py | ||
idle.pyw | ||
idlever.py | ||
keydefs.py | ||
setup.py | ||
testcode.py |
README.txt
IDLE 0.5 - February 2000 ------------------------ This is an early release of IDLE, my own attempt at a Tkinter-based IDE for Python. For news about this release, see the file NEWS.txt. (For a more detailed change log, see the file ChangeLog.) FEATURES IDLE has the following features: - coded in 100% pure Python, using the Tkinter GUI toolkit (i.e. Tcl/Tk) - cross-platform: works on Windows and Unix (on the Mac, there are currently problems with Tcl/Tk) - multi-window text editor with multiple undo, Python colorizing and many other features, e.g. smart indent and call tips - Python shell window (a.k.a. interactive interpreter) - debugger (not complete, but you can set breakpoints, view and step) USAGE The main program is in the file "idle.py"; on Unix, you should be able to run it by typing "./idle.py" to your shell. On Windows, you can run it by double-clicking it; you can use idle.pyw to avoid popping up a DOS console. If you want to pass command line arguments on Windows, use the batch file idle.bat. Command line arguments: files passed on the command line are executed, not opened for editing, unless you give the -e command line option. Try "./idle.py -h" to see other command line options. IDLE requires Python 1.5.2, so it is currently only usable with a Python 1.5.2 distribution. (An older version of IDLE is distributed with Python 1.5.2; you can drop this version on top of it.) COPYRIGHT IDLE is covered by the standard Python copyright notice (http://www.python.org/doc/Copyright.html). FEEDBACK For feedback, please use the Python Bugs List (http://www.python.org/search/search_bugs.html). --Guido van Rossum (home page: http://www.python.org/~guido/)