Skip to content

Commit a4f8525

Browse files
authored
Merge pull request #611 from boriel/feature/add_executable_path_to_sys_path
feat: append executable path to sys.path
2 parents 5799d6f + 92c8e18 commit a4f8525

4 files changed

Lines changed: 18 additions & 4 deletions

File tree

zxb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
# vim: ts=4:sw=4:et:
44

55
import sys
6+
import os
67

7-
from src import zxbc
8+
sys.path.append(os.path.dirname(__file__))
9+
10+
from src import zxbc # noqa: E402
811

912
if __name__ == "__main__":
1013
print("-" * 48 + "\n* WARNING: zxb is deprecated! Use zxbc instead *\n" + "-" * 48, file=sys.stderr)

zxbasm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
# ----------------------------------------------------------------------
1313

1414
import sys
15-
from src import zxbasm
15+
import os
16+
17+
sys.path.append(os.path.dirname(__file__))
18+
19+
from src import zxbasm # noqa: E402
1620

1721
if __name__ == "__main__":
1822
sys.exit(zxbasm.main())

zxbc.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
# vim: ts=4:sw=4:et:
44

55
import sys
6+
import os
67

7-
from src import zxbc
8+
sys.path.append(os.path.dirname(__file__))
9+
10+
from src import zxbc # noqa: E402
811

912
if __name__ == "__main__":
1013
sys.exit(zxbc.main()) # Exit

zxbpp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
# ----------------------------------------------------------------------
1313

1414
import sys
15-
from src import zxbpp
15+
import os
16+
17+
sys.path.append(os.path.dirname(__file__))
18+
19+
from src import zxbpp # noqa: E402
1620

1721
if __name__ == "__main__":
1822
sys.exit(zxbpp.entry_point())

0 commit comments

Comments
 (0)