aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/ScintillaData.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-04-17 20:24:30 +1000
committerNeil <nyamatongwe@gmail.com>2020-04-17 20:24:30 +1000
commitdf5f7a0c831a77b4c981e168a5dbbdcaaa4d90b9 (patch)
tree36b72451e473470c567d0c108eaa829f1415cf1b /scripts/ScintillaData.py
parent9e2bd8b981c5d6891b7e0bf9418fd70aceff9602 (diff)
downloadscintilla-mirror-df5f7a0c831a77b4c981e168a5dbbdcaaa4d90b9.tar.gz
Update Python versions. Modules that are only used as top level scripts or from
scripts that require Python 3.6 have Python 2.x support removed. Modules that may be called from Python 2 for PySide require Python 2.7. Documented how to run scripts.
Diffstat (limited to 'scripts/ScintillaData.py')
-rw-r--r--scripts/ScintillaData.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/scripts/ScintillaData.py b/scripts/ScintillaData.py
index 17ac33d27..5bb9fb1bc 100644
--- a/scripts/ScintillaData.py
+++ b/scripts/ScintillaData.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python3
# ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org
# Released to the public domain.
@@ -30,7 +31,7 @@
# dictionary of file names { SCLEX_ID: file name }
# This file can be run to see the data it provides.
-# Requires Python 2.7 or later
+# Requires Python 3.6 or later
from __future__ import with_statement
@@ -178,17 +179,11 @@ def FindCredits(historyFile):
credits.append(credit)
return credits
-def ciCompare(a,b):
- return cmp(a.lower(), b.lower())
-
def ciKey(a):
return a.lower()
def SortListInsensitive(l):
- try: # Try key function
- l.sort(key=ciKey)
- except TypeError: # Earlier version of Python, so use comparison function
- l.sort(ciCompare)
+ l.sort(key=ciKey)
class ScintillaData:
def __init__(self, scintillaRoot):