Open clauseggers opened 11 months ago
Hi,
Here's how I've solved this issue in simplenote_cli/clipboard.py
@@ -1,5 +1,5 @@
import os
-from distutils import spawn
+from shutil import which
from subprocess import Popen, PIPE
@@ -8,9 +8,9 @@
self.copy_command = self.get_copy_command()
def get_copy_command(self):
- if (spawn.find_executable('xsel')):
+ if (which('xsel')):
return ['xsel', '-ib']
- if (spawn.find_executable('pbcopy')):
+ if (which('pbcopy')):
return ['pbcopy']
return None
Closed with this commit
@clauseggers please close the issue
As per https://docs.python.org/3.12/whatsnew/3.12.html
distutils
is removed from Python 3.12Of note, the distutils package has been removed from the standard library.
Executing
sncli
now throwsModuleNotFoundError: No module named 'distutils'