• Guido van Rossum's avatar
    Provisional fix for writefile() [SF bug # 541730]. · f90d5292
    Guido van Rossum yazdı
    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.
    f90d5292
Adı
Son kayıt (commit)
Son güncelleme
..
Icons Loading commit data...
AutoExpand.py Loading commit data...
AutoIndent.py Loading commit data...
Bindings.py Loading commit data...
CallTipWindow.py Loading commit data...
CallTips.py Loading commit data...
ChangeLog Loading commit data...
ClassBrowser.py Loading commit data...
ColorDelegator.py Loading commit data...
Debugger.py Loading commit data...
Delegator.py Loading commit data...
EditorWindow.py Loading commit data...
FileList.py Loading commit data...
FormatParagraph.py Loading commit data...
FrameViewer.py Loading commit data...
GrepDialog.py Loading commit data...
IOBinding.py Loading commit data...
IdleConf.py Loading commit data...
IdleHistory.py Loading commit data...
MultiScrolledLists.py Loading commit data...
MultiStatusBar.py Loading commit data...
NEWS.txt Loading commit data...
ObjectBrowser.py Loading commit data...
OldStackViewer.py Loading commit data...
OutputWindow.py Loading commit data...
ParenMatch.py Loading commit data...
PathBrowser.py Loading commit data...
Percolator.py Loading commit data...
PyParse.py Loading commit data...
PyShell.py Loading commit data...
README.txt Loading commit data...
RemoteInterp.py Loading commit data...
ReplaceDialog.py Loading commit data...
ScriptBinding.py Loading commit data...
ScrolledList.py Loading commit data...
SearchBinding.py Loading commit data...
SearchDialog.py Loading commit data...
SearchDialogBase.py Loading commit data...
SearchEngine.py Loading commit data...
Separator.py Loading commit data...
StackViewer.py Loading commit data...
TODO.txt Loading commit data...
ToolTip.py Loading commit data...
TreeWidget.py Loading commit data...
UndoDelegator.py Loading commit data...
WidgetRedirector.py Loading commit data...
WindowList.py Loading commit data...
ZoomHeight.py Loading commit data...
__init__.py Loading commit data...
config-mac.txt Loading commit data...
config-unix.txt Loading commit data...
config-win.txt Loading commit data...
config.txt Loading commit data...
eventparse.py Loading commit data...
extend.txt Loading commit data...
help.txt Loading commit data...
idle Loading commit data...
idle.bat Loading commit data...
idle.py Loading commit data...
idle.pyw Loading commit data...
idlever.py Loading commit data...
keydefs.py Loading commit data...
setup.py Loading commit data...
testcode.py Loading commit data...