summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-10-16 20:20:52 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-10-16 20:20:52 +0800
commitb78ed10354119b6a1787db22cd19c1f04986c16d (patch)
tree07574cbc5f478416f7a02ae95907a4c3a0c90dbd
parentf46c1abac274eb653abfeb713b8940fe0eeb7b64 (diff)
init main for choice
-rw-r--r--main.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.py b/main.py
new file mode 100644
index 0000000..a04d1d5
--- /dev/null
+++ b/main.py
@@ -0,0 +1,8 @@
+from sys import argv, executable
+from os import execv
+if argv[1] == 'write':
+ execv(executable, ['python3', 'write.py'])
+elif argv[1] =='read':
+ execv(executable, ['python3','read.py'])
+else:
+ raise Exception("Unknown command") \ No newline at end of file