aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/GenerateCharacterCategory.py
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2026-03-19 12:00:33 +1100
committerNeil <nyamatongwe@gmail.com>2026-03-19 12:00:33 +1100
commit69afca435b271b42a341730802467bacf88fa444 (patch)
treef1a7c127ab122429256a57a4d1955ae5ee2e7884 /scripts/GenerateCharacterCategory.py
parent7c601c401a26d203d191b198a52e745f6a67c1fe (diff)
downloadscintilla-mirror-69afca435b271b42a341730802467bacf88fa444.tar.gz
Remove unnecessary readlines and make FindCredits same as SciTE.
Diffstat (limited to 'scripts/GenerateCharacterCategory.py')
-rw-r--r--scripts/GenerateCharacterCategory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/GenerateCharacterCategory.py b/scripts/GenerateCharacterCategory.py
index 806dea2fe..1080cceed 100644
--- a/scripts/GenerateCharacterCategory.py
+++ b/scripts/GenerateCharacterCategory.py
@@ -2,7 +2,7 @@
# Script to generate scintilla/src/CharacterCategoryMap.cxx and lexilla/lexlib/CharacterCategory.cxx
# from Python's Unicode data
# Should be run rarely when a Python with a new version of Unicode data is available.
-# Requires Python 3.3 or later
+# Requires Python 3.6 or later
# Should not be run with old versions of Python.
import pathlib, platform, sys, unicodedata
@@ -11,7 +11,7 @@ from FileGenerator import Regenerate
def findCategories(filename):
with filename.open(encoding="UTF-8") as infile:
- lines = [x.strip() for x in infile.readlines() if "\tcc" in x]
+ lines = [x.strip() for x in infile if "\tcc" in x]
values = "".join(lines).replace(" ","").split(",")
print("Categrories:", values)
return [v[2:] for v in values]