9
1
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-22 03:23:29 +01:00

Minor change in Python scripts

This commit is contained in:
Anthony Scemama 2019-03-20 12:43:32 +01:00
parent f4e305c0a4
commit 34f701f8cd

View File

@ -1,14 +1,15 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
import os import os
from qp_path import QP_SRC
Pert_dir = os.environ["QP_ROOT"]+"/src/perturbation/" Pert_dir = os.path.join(QP_SRC,"perturbation")
perturbations = [] perturbations = []
for filename in filter(lambda x: x.endswith(".irp.f"), os.listdir(Pert_dir)): for filename in filter(lambda x: x.endswith(".irp.f"), os.listdir(Pert_dir)):
filename = Pert_dir+filename filename = os.path.join(Pert_dir,filename)
file = open(filename,'r') file = open(filename,'r')
lines = file.readlines() lines = file.readlines()
file.close() file.close()