- Timestamp:
- Jan 16, 2024 11:17:47 AM (16 months ago)
- svn:sync-xref-src-repo-rev:
- 161112
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r102872 r102890 1 #!/ usr/bin/env python1 #!/bin/sh 2 2 # -*- coding: utf-8 -*- 3 3 # pylint: disable=too-many-lines 4 4 # $Id$ 5 5 6 # The following checks for the right (i.e. most recent) Python binary available 7 # and re-starts the script using that binary (like a shell wrapper). 8 # 9 # Using a shebang like "#!/bin/env python" on newer Fedora/Debian distros is banned [1] 10 # and also won't work on other newer distros (Ubuntu >= 23.10), as those only ship 11 # python3 without a python->python3 symlink anymore. 12 # 13 # Note: As Python 2 is EOL, we consider this last (and hope for the best). 14 # 15 # [1] https://lists.fedoraproject.org/archives/list/[email protected]/message/2PD5RNJRKPN2DVTNGJSBHR5RUSVZSDZI/ 16 ''':' 17 for python_bin in python3 python python2 18 do 19 type "$python_bin" > /dev/null 2>&1 && exec "$python_bin" "$0" "$@" 20 done 21 echo >&2 "ERROR: Python not found! Please install this first in order to run this program." 22 exit 1 23 ':''' 24 25 from __future__ import print_function 26 6 27 """ 7 28 VirtualBox Python Shell. … … 20 41 P.S. Our apologies for the code quality. 21 42 """ 22 23 from __future__ import print_function24 43 25 44 __copyright__ = \
Note:
See TracChangeset
for help on using the changeset viewer.