python3 hashbang

This commit is contained in:
Frank DeMarco 2020-10-05 18:37:18 -04:00
parent dd938d8da2
commit b09ff54d3b
3 changed files with 2 additions and 15 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "lib/pgfw"]
path = lib/pgfw
url = makar:/var/www/git/pgfw

View File

@ -1,8 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python3
from os import environ, execvp, chdir, getcwd from os import environ, execvp, chdir, getcwd
from os.path import exists, join, dirname from os.path import exists, join, dirname
from sys import version_info, argv, maxint from sys import version_info, argv
def can_import(module_name): def can_import(module_name):
try: try:
@ -29,15 +29,6 @@ def launch_alternative(alternatives):
def move_to_executable(): def move_to_executable():
chdir(dirname(argv[0])) chdir(dirname(argv[0]))
if is_python_3():
launch_alternative(["python2", "python2.7", "python2.6"])
# if maxint >> 33:
# launch_alternative(["python-32", "python2-32", "python2.7-32", "python2.6-32"])
if not can_import("pygame"):
launch_alternative(["python2.7", "python2.6"])
if "--go-to-dir" in argv: if "--go-to-dir" in argv:
move_to_executable() move_to_executable()

@ -1 +0,0 @@
Subproject commit 498755ef0e4cadfe3784363e5eb0ec1aff016631