From 183ae1e1f0371e8bd3a665b1e31e6a1284ba44e4 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 8 Apr 2024 12:31:16 +0800 Subject: fixed buggs, added feathers --- main.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index 849f8f9..07070fd 100755 --- a/main.py +++ b/main.py @@ -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() -- cgit v1.2.3