diff options
| author | troido <troido@hotmail.com> | 2017-10-30 12:01:16 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2017-10-30 12:01:16 +0100 |
| commit | bcc306d36d639b0282c13ba25d187a22fb5e1d9f (patch) | |
| tree | c4ca2fbf877b56ec4123d53e9fe30354eef47d14 /asciifarm/client/__main__.py | |
| parent | d1f84633cff02d9d43c321814364b2c30c4fa3a9 (diff) | |
finally made everything executable that I wanted to be executable
Diffstat (limited to 'asciifarm/client/__main__.py')
| -rw-r--r-- | asciifarm/client/__main__.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/asciifarm/client/__main__.py b/asciifarm/client/__main__.py index ccc3f91..f30b6db 100644 --- a/asciifarm/client/__main__.py +++ b/asciifarm/client/__main__.py @@ -1,10 +1,16 @@ import sys -import client if sys.version_info[0] < 3: print("This game is written in python 3.\nRun 'python3 "+sys.argv[0]+"' or './"+sys.argv[0]+"'") sys.exit(-1) -client.main() +if __package__: + from . import main +else: + import os.path + sys.path.append(os.path.join(os.path.dirname(__file__), "..")) + from client import main + +main.main() |
