summaryrefslogtreecommitdiff
path: root/tools/debug-debug-scripts
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-16 10:28:00 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-10-16 10:28:26 +0200
commitc69a09c693fc390f0e85de17ffede0809be89d9e (patch)
tree6cac386ef282f6a5a8a0409fc9d4d79675eac505 /tools/debug-debug-scripts
parente6e23a2b707784ae905ebcc23d05d2318718b8bf (diff)
parent0db9190dd147196531b16a050fb7a019dd1873af (diff)
downloadtmwa-c69a09c693fc390f0e85de17ffede0809be89d9e.tar.gz
tmwa-c69a09c693fc390f0e85de17ffede0809be89d9e.tar.bz2
tmwa-c69a09c693fc390f0e85de17ffede0809be89d9e.tar.xz
tmwa-c69a09c693fc390f0e85de17ffede0809be89d9e.zip
Merge branch 'blaming-the-tools'
Build system overhaul: attoconf from python 2->3, add CMake Merge request !280
Diffstat (limited to 'tools/debug-debug-scripts')
-rwxr-xr-xtools/debug-debug-scripts9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/debug-debug-scripts b/tools/debug-debug-scripts
index 2112a6e..5ba7ecb 100755
--- a/tools/debug-debug-scripts
+++ b/tools/debug-debug-scripts
@@ -1,6 +1,5 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# encoding: utf-8
-from __future__ import print_function
copyright = '''
// Copyright © 2014 Ben Longbons <b.r.longbons@gmail.com>
@@ -35,6 +34,12 @@ error = False
def eprint(s):
print('Error:', s, file=sys.stderr)
+# Implement an equivalent to Python 2's execfile for Python 3
+def execfile(filename, globals=None, locals=None):
+ with open(filename, 'r') as f:
+ code = compile(f.read(), filename, 'exec')
+ exec(code, globals, locals)
+
def get_classes_from_file(a):
global error
d = {}