From: Oleg Broytman Date: Wed, 11 Dec 2024 21:03:13 +0000 (+0300) Subject: Fix(bin): Use my global user-installed python3 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=3c54a298e631c77c234392d321dc111136a02c6a;p=dotfiles.git Fix(bin): Use my global user-installed python3 Many scripts import modules not installed in the current virtual environment. --- diff --git a/bin/GET.py b/bin/GET.py index 2f00d89..c20f0c1 100755 --- a/bin/GET.py +++ b/bin/GET.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from urllib.parse import urlsplit, parse_qsl, quote, quote_plus, urlencode from urllib.request import urlretrieve diff --git a/bin/HEAD.py b/bin/HEAD.py index 6c0e5f7..334472d 100755 --- a/bin/HEAD.py +++ b/bin/HEAD.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from http.client import HTTPConnection, HTTPSConnection from urllib.parse import urlsplit, parse_qsl, urlencode, quote, quote_plus diff --git a/bin/PS b/bin/PS index 7fbd8b1..8fe1078 100755 --- a/bin/PS +++ b/bin/PS @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys, os diff --git a/bin/abspath.py b/bin/abspath.py index cbda1c8..b5aeae6 100755 --- a/bin/abspath.py +++ b/bin/abspath.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys, os print(os.path.abspath(sys.argv[1])) diff --git a/bin/browser-stack.py b/bin/browser-stack.py index 7120479..e0e6575 100755 --- a/bin/browser-stack.py +++ b/bin/browser-stack.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from __future__ import print_function import sys, os diff --git a/bin/cmp.py b/bin/cmp.py index 800e119..45e3fd4 100755 --- a/bin/cmp.py +++ b/bin/cmp.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 """cmp.py: compare two files. Replace cmp because standard cmp cannot compare large files. """ diff --git a/bin/compyle4vim.py b/bin/compyle4vim.py index 08f9324..8c7d256 100755 --- a/bin/compyle4vim.py +++ b/bin/compyle4vim.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys, os diff --git a/bin/decode-URLs.py b/bin/decode-URLs.py index 6b98bb3..1c164bd 100755 --- a/bin/decode-URLs.py +++ b/bin/decode-URLs.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from urllib.parse import unquote import sys diff --git a/bin/get_html_encoding.py b/bin/get_html_encoding.py index 381be9c..5fa5473 100755 --- a/bin/get_html_encoding.py +++ b/bin/get_html_encoding.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from m_lib.net.www.html import HTMLParser as _HTMLParser diff --git a/bin/get_xml_encoding.py b/bin/get_xml_encoding.py index cdd9b6b..cff2123 100755 --- a/bin/get_xml_encoding.py +++ b/bin/get_xml_encoding.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 charset = None def xml_decl_handler(version, encoding, standalone): diff --git a/bin/iconv.py b/bin/iconv.py index 8c8d96f..6f594c6 100755 --- a/bin/iconv.py +++ b/bin/iconv.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 "Recode to default charset" import sys diff --git a/bin/iconvx.py b/bin/iconvx.py index 7e92973..7ec3c96 100755 --- a/bin/iconvx.py +++ b/bin/iconvx.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 "iconv wrapper" import os, shutil, tempfile diff --git a/bin/idna.py b/bin/idna.py index 44843ac..6019f05 100755 --- a/bin/idna.py +++ b/bin/idna.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys from m_lib.defenc import default_encoding diff --git a/bin/koi2lat b/bin/koi2lat index 4687100..81e1c82 100755 --- a/bin/koi2lat +++ b/bin/koi2lat @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys from m_lib.rus import rus2lat diff --git a/bin/l8 b/bin/l8 deleted file mode 100755 index d8b8566..0000000 --- a/bin/l8 +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -. "$HOME"/lib/X11/koi8.vars -exec luit -encoding koi8-r "$@" diff --git a/bin/lat2koi b/bin/lat2koi index 9c43755..bb9f1ad 100755 --- a/bin/lat2koi +++ b/bin/lat2koi @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys from m_lib.rus import lat2rus diff --git a/bin/mc_type.py b/bin/mc_type.py index d2e9884..04347cf 100755 --- a/bin/mc_type.py +++ b/bin/mc_type.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys, subprocess diff --git a/bin/mutt8 b/bin/mutt8 deleted file mode 100755 index 0fa81c4..0000000 --- a/bin/mutt8 +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -. "$HOME"/lib/X11/utf-8.vars -exec mutt "$@" diff --git a/bin/recode-filenames-recursive.py b/bin/recode-filenames-recursive.py index 1d73a92..5afeed1 100755 --- a/bin/recode-filenames-recursive.py +++ b/bin/recode-filenames-recursive.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import os diff --git a/bin/recode_filenames.py b/bin/recode_filenames.py index 1f543d4..1f2ece9 100755 --- a/bin/recode_filenames.py +++ b/bin/recode_filenames.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 # -*- coding: koi8-r -*- import argparse diff --git a/bin/text-wrap.py b/bin/text-wrap.py index ecfafa8..4d54e10 100755 --- a/bin/text-wrap.py +++ b/bin/text-wrap.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from __future__ import print_function import sys diff --git a/bin/tt b/bin/tt index 72eca81..ef89da4 100755 --- a/bin/tt +++ b/bin/tt @@ -1,2 +1,2 @@ #! /bin/sh -exec tcptraceroute "$@" +exec sudo tcptraceroute "$@" diff --git a/bin/unicode_norm_nfd.py b/bin/unicode_norm_nfd.py index 030de47..bd9d452 100755 --- a/bin/unicode_norm_nfd.py +++ b/bin/unicode_norm_nfd.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 # https://stackoverflow.com/a/518232/7976758 import sys diff --git a/bin/unzip.py b/bin/unzip.py index ab62d24..c95cb01 100755 --- a/bin/unzip.py +++ b/bin/unzip.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 """Unzip with encoded filenames Written by Oleg Broytman. Copyright (C) 2009-2024 PhiloSoft Design. diff --git a/bin/vim8 b/bin/vim8 deleted file mode 100755 index 63793c0..0000000 --- a/bin/vim8 +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -exec vim -c "ed ++enc=utf-8" "$@" diff --git a/bin/webbrowser b/bin/webbrowser index a4c2024..c3e9414 100755 --- a/bin/webbrowser +++ b/bin/webbrowser @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 import sys, os diff --git a/bin/webbrowser-encode-url b/bin/webbrowser-encode-url index 4444c4b..4829e6d 100755 --- a/bin/webbrowser-encode-url +++ b/bin/webbrowser-encode-url @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from getopt import getopt, GetoptError from urllib.parse import urlsplit, parse_qsl, quote, quote_plus, urlencode diff --git a/bin/wget-download b/bin/wget-download index a851395..e9f0c70 100755 --- a/bin/wget-download +++ b/bin/wget-download @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 from getopt import getopt, GetoptError from urllib.parse import urlsplit, parse_qsl, quote, quote_plus, urlencode diff --git a/bin/whereis b/bin/whereis new file mode 120000 index 0000000..af2e482 --- /dev/null +++ b/bin/whereis @@ -0,0 +1 @@ +whence \ No newline at end of file diff --git a/bin/zip.py b/bin/zip.py index bf55a08..99761a0 100755 --- a/bin/zip.py +++ b/bin/zip.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /home/phd/.local/bin/python3 """Zip (zip -r9) with encoded filenames Written by Oleg Broytman. Copyright (C) 2009-2023 PhiloSoft Design.