summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/editor.py')
-rw-r--r--Lib/idlelib/editor.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py
index fcc8a3f..6c52efd 100644
--- a/Lib/idlelib/editor.py
+++ b/Lib/idlelib/editor.py
@@ -27,6 +27,7 @@ from idlelib import query
from idlelib import replace
from idlelib import search
from idlelib.tree import wheel_event
+from idlelib.util import py_extensions
from idlelib import window
# The default tab setting for a Text widget, in average-width characters.
@@ -757,7 +758,7 @@ class EditorWindow:
if not filename or os.path.isdir(filename):
return True
base, ext = os.path.splitext(os.path.basename(filename))
- if os.path.normcase(ext) in (".py", ".pyw"):
+ if os.path.normcase(ext) in py_extensions:
return True
line = self.text.get('1.0', '1.0 lineend')
return line.startswith('#!') and 'python' in line