diff Lib/idlelib/PyShell.py @ 34443:cd6b54ba272f legacy-trunk

1. Polish tabbing code. 2. Restore use of set_indentation_params(), was dead code since Autoindent.py was merged into EditorWindow.py. 3. Make usetabs, indentwidth, tabwidth, context_use_ps1 instance vars and set in EditorWindow.__init__() 4. In PyShell.__init__() set usetabs, indentwidth and context_use_ps1 explicitly (config() is eliminated). 5. Add Tabnanny check when Module is Run/F5, not just when Checked. 6. Discourage using an indent width other than 8 when using tabs to indent Python code. M EditorWindow.py M NEWS.txt M PyShell.py M ScriptBinding.py
author Kurt B. Kaiser <kbk@shore.net>
date Wed, 19 Jan 2005 00:22:59 +0000
parents 914534f6ef61
children e4e0cff16bc7
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py	Tue Jan 18 15:56:11 2005 +0000
+++ b/Lib/idlelib/PyShell.py	Wed Jan 19 00:22:59 2005 +0000
@@ -795,7 +795,11 @@
         import __builtin__
         __builtin__.quit = __builtin__.exit = "To exit, type Ctrl-D."
         #
-        self.config(usetabs=1, indentwidth=8, context_use_ps1=1)
+##        self.config(usetabs=1, indentwidth=8, context_use_ps1=1)
+        self.usetabs = True
+        # indentwidth must be 8 when using tabs.  See note in EditorWindow:
+        self.indentwidth = 8
+        self.context_use_ps1 = True
         #
         text = self.text
         text.configure(wrap="char")