python3 hashbang
This commit is contained in:
parent
dd938d8da2
commit
b09ff54d3b
|
@ -1,3 +0,0 @@
|
||||||
[submodule "lib/pgfw"]
|
|
||||||
path = lib/pgfw
|
|
||||||
url = makar:/var/www/git/pgfw
|
|
13
OPEN-GAME
13
OPEN-GAME
|
@ -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
lib/pgfw
1
lib/pgfw
|
@ -1 +0,0 @@
|
||||||
Subproject commit 498755ef0e4cadfe3784363e5eb0ec1aff016631
|
|
Loading…
Reference in New Issue