diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-04-08 12:31:16 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-04-08 12:31:16 +0800 |
| commit | 183ae1e1f0371e8bd3a665b1e31e6a1284ba44e4 (patch) | |
| tree | 6a71ca8f6ad19d2c4355ad992ec32a11bc79fb2b /main.py | |
| parent | 2845da8fcbf4c6024e5c8264aab04c00c5bf26a8 (diff) | |
fixed buggs, added feathersmain
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -1,19 +1,20 @@ #!/usr/bin/env python -from sys import argv, executable -from os import execv, path +from sys import argv +from os.path import islink, dirname, abspath +from stdlib import runutil -if path.islink(__file__): +if islink(__file__): from os import readlink file = readlink(__file__) else: file = __file__ -cwd = path.dirname(path.abspath(file)) +cwd = dirname(abspath(file)) def write(): - execv(executable, ['python3', f'{cwd}/write.py']) + runutil("write.py") def read(): - execv(executable, ['python3', f'{cwd}/read.py']) + runutil("read.py") if len(argv) > 1: if argv[1] == 'write': write() |
