From c9c7f85c9db73059b3407acc703afeafe3736daf Mon Sep 17 00:00:00 2001 From: Joannah Nanjekye Date: Fri, 7 Oct 2022 14:51:33 -0700 Subject: [PATCH 1/3] Retire eptag ptag scripts --- Tools/scripts/README | 1 - Tools/scripts/eptags.py | 57 ----------------------------------------- Tools/scripts/ptags.py | 54 -------------------------------------- 3 files changed, 112 deletions(-) delete mode 100755 Tools/scripts/eptags.py delete mode 100755 Tools/scripts/ptags.py diff --git a/Tools/scripts/README b/Tools/scripts/README index b53b0f21d7c293..70ea5f4cd0feae 100644 --- a/Tools/scripts/README +++ b/Tools/scripts/README @@ -5,7 +5,6 @@ useful while building, extending or managing Python. abitype.py Converts a C file to use the PEP 384 type definition API combinerefs.py A helper for analyzing PYTHONDUMPREFS output diff.py Print file diffs in context, unified, or ndiff formats -eptags.py Create Emacs TAGS file for Python modules gprof2html.py Transform gprof(1) output into useful HTML idle3 Main program to start IDLE md5sum.py Print MD5 checksums of argument files diff --git a/Tools/scripts/eptags.py b/Tools/scripts/eptags.py deleted file mode 100755 index 7f8059ba71adf3..00000000000000 --- a/Tools/scripts/eptags.py +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/env python3 -"""Create a TAGS file for Python programs, usable with GNU Emacs. - -usage: eptags pyfiles... - -The output TAGS file is usable with Emacs version 18, 19, 20. -Tagged are: - - functions (even inside other defs or classes) - - classes - -eptags warns about files it cannot open. -eptags will not give warnings about duplicate tags. - -BUGS: - Because of tag duplication (methods with the same name in different - classes), TAGS files are not very useful for most object-oriented - python projects. -""" -import sys,re - -expr = r'^[ \t]*(def|class)[ \t]+([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*[:\(]' -matcher = re.compile(expr) - -def treat_file(filename, outfp): - """Append tags found in file named 'filename' to the open file 'outfp'""" - try: - fp = open(filename, 'r') - except OSError: - sys.stderr.write('Cannot open %s\n'%filename) - return - with fp: - charno = 0 - lineno = 0 - tags = [] - size = 0 - while 1: - line = fp.readline() - if not line: - break - lineno = lineno + 1 - m = matcher.search(line) - if m: - tag = m.group(0) + '\177%d,%d\n' % (lineno, charno) - tags.append(tag) - size = size + len(tag) - charno = charno + len(line) - outfp.write('\f\n%s,%d\n' % (filename,size)) - for tag in tags: - outfp.write(tag) - -def main(): - with open('TAGS', 'w') as outfp: - for filename in sys.argv[1:]: - treat_file(filename, outfp) - -if __name__=="__main__": - main() diff --git a/Tools/scripts/ptags.py b/Tools/scripts/ptags.py deleted file mode 100755 index eedd411702c199..00000000000000 --- a/Tools/scripts/ptags.py +++ /dev/null @@ -1,54 +0,0 @@ -#! /usr/bin/env python3 - -# ptags -# -# Create a tags file for Python programs, usable with vi. -# Tagged are: -# - functions (even inside other defs or classes) -# - classes -# - filenames -# Warns about files it cannot open. -# No warnings about duplicate tags. - -import sys, re, os - -tags = [] # Modified global variable! - -def main(): - args = sys.argv[1:] - for filename in args: - treat_file(filename) - if tags: - with open('tags', 'w') as fp: - tags.sort() - for s in tags: fp.write(s) - - -expr = r'^[ \t]*(def|class)[ \t]+([a-zA-Z0-9_]+)[ \t]*[:\(]' -matcher = re.compile(expr) - -def treat_file(filename): - try: - fp = open(filename, 'r') - except: - sys.stderr.write('Cannot open %s\n' % filename) - return - with fp: - base = os.path.basename(filename) - if base[-3:] == '.py': - base = base[:-3] - s = base + '\t' + filename + '\t' + '1\n' - tags.append(s) - while 1: - line = fp.readline() - if not line: - break - m = matcher.match(line) - if m: - content = m.group(0) - name = m.group(2) - s = name + '\t' + filename + '\t/^' + content + '/\n' - tags.append(s) - -if __name__ == '__main__': - main() From 703662032415a42bad9b923fb752e69a2ba11d2e Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 7 Oct 2022 22:06:14 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst diff --git a/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst b/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst new file mode 100644 index 00000000000000..3ab95ff21f6a32 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst @@ -0,0 +1 @@ +Remove ptags and eptags scripts From 0c9b54d3f8f18cd1bd860323e278eac6be20c2c5 Mon Sep 17 00:00:00 2001 From: Joannah Nanjekye Date: Fri, 7 Oct 2022 16:08:51 -0700 Subject: [PATCH 3/3] fix news entry error --- .../Tools-Demos/2022-10-07-22-06-11.gh-issue-68686.6KNIQ4.rst | 1 + .../Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-68686.6KNIQ4.rst delete mode 100644 Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst diff --git a/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-68686.6KNIQ4.rst b/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-68686.6KNIQ4.rst new file mode 100644 index 00000000000000..a4289d675703b3 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-68686.6KNIQ4.rst @@ -0,0 +1 @@ +Remove ptags and eptags scripts. diff --git a/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst b/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst deleted file mode 100644 index 3ab95ff21f6a32..00000000000000 --- a/Misc/NEWS.d/next/Tools-Demos/2022-10-07-22-06-11.gh-issue-8686.6KNIQ4.rst +++ /dev/null @@ -1 +0,0 @@ -Remove ptags and eptags scripts pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy