33 lines
417 B
Python
Executable File
33 lines
417 B
Python
Executable File
#!/sf/bernina/applications/bm/envs/default/bin/python
|
|
import sys
|
|
from pathlib import Path
|
|
pgroup = sys.argv[1]
|
|
def pgroup2name(pgroup):
|
|
tp = '/sf/bernina/exp/'
|
|
d = Path(tp)
|
|
dirs = [i for i in d.glob('*') if i.is_symlink()]
|
|
names = [i.name for i in dirs]
|
|
targets = [i.resolve().name for i in dirs]
|
|
return names[targets.index(pgroup)]
|
|
|
|
print(pgroup2name(pgroup))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|