-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseedling.py
More file actions
47 lines (30 loc) · 802 Bytes
/
seedling.py
File metadata and controls
47 lines (30 loc) · 802 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
__author__ = "Shane Drabing"
__license__ = "MIT"
__email__ = "shane.drabing@gmail.com"
# IMPORTS
import sys
# CONSTANTS
WINDOWS = str(sys.platform) in ("win32", "cygwin")
# SCRIPT
if __name__ == "__main__":
import subprocess
import sys
import time
proc = list()
here = sys.path[0]
print("\n\nPlease enter taxa searches on any line:\n")
while True:
time.sleep(0.01)
try:
term = input().strip()
if (term == "exit"):
break
proc.append(subprocess.Popen((
f"python{'3' if not WINDOWS else str()} " +
f"{here}/src/arboretum.py {term}"
).split()))
except KeyboardInterrupt:
break
for p in proc:
p.kill()
print("\n")