Patch-Source: https://github.com/fmoo/python-editor/commit/5023fafd265add111b29baca59b07f140daf75b7 From 5023fafd265add111b29baca59b07f140daf75b7 Mon Sep 17 00:00:00 2001 From: Branch Vincent Date: Sun, 8 Oct 2023 12:52:53 -0700 Subject: [PATCH] support python 3.12 Python 3.12 has removed `distutils`: https://docs.python.org/3.12/whatsnew/3.12.html#removed --- editor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor.py b/editor.py index 6fc73f1..eafc189 100755 --- a/editor.py +++ b/editor.py @@ -10,3 +10,6 @@ import subprocess import tempfile -from distutils.spawn import find_executable +try: + from distutils.spawn import find_executable +except ImportError: + from shutil import which as find_executable