mirror of https://gitlab.com/pamhyr/pamhyr2
debug adis path windows
parent
9b6abadb5a
commit
af30fde81a
|
|
@ -17,7 +17,6 @@
|
|||
import logging
|
||||
import numpy as np
|
||||
import os
|
||||
import glob
|
||||
|
||||
from copy import deepcopy
|
||||
from datetime import datetime
|
||||
|
|
@ -42,10 +41,8 @@ class Results(object):
|
|||
"creation_date": datetime.now(),
|
||||
}
|
||||
repertory_results = os.path.join(repertory, "resultats")
|
||||
self._pollutants_list = [
|
||||
el.split("/")[-1][0:-4]
|
||||
for el in glob.glob(repertory_results + "/*.bin")
|
||||
]
|
||||
filelist = [f for f in os.listdir(repertory_results) if os.path.isfile(os.path.join(repertory_results, f))]
|
||||
self._pollutants_list = [f[0:-4] for f in filelist if f[-4:] == ".bin"]
|
||||
self._pollutants_list.insert(0, self._pollutants_list.pop(
|
||||
self._pollutants_list.index("total_sediment"))
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
|
||||
import numpy as np
|
||||
|
|
@ -621,9 +620,8 @@ class AdisTSwc(AdisTS):
|
|||
def read_bin(self, study, repertory, results, qlog=None, name="0"):
|
||||
|
||||
repertory_results = os.path.join(repertory, "resultats")
|
||||
|
||||
files_bin_names = [el.split("/")[-1]
|
||||
for el in glob.glob(repertory_results+"/*.bin")]
|
||||
filelist = [f for f in os.listdir(repertory_results) if os.path.isfile(os.path.join(repertory_results, f))]
|
||||
files_bin_names = [f for f in filelist if f[-4:] == ".bin"]
|
||||
files_bin_names.insert(0, files_bin_names.pop(
|
||||
files_bin_names.index("total_sediment.bin"))
|
||||
)
|
||||
|
|
@ -856,11 +854,11 @@ class AdisTSwc(AdisTS):
|
|||
return
|
||||
|
||||
repertory_results = os.path.join(repertory, "resultats")
|
||||
filelist = [f for f in os.listdir(repertory_results) if os.path.isfile(os.path.join(repertory_results, f))]
|
||||
files_bin_names = [f for f in filelist if f[-4:] == ".bin"]
|
||||
|
||||
files_bin_names = [el.split("/")[-1]
|
||||
for el in glob.glob(repertory_results+"/*.bin")]
|
||||
for el in glob.glob(repertory_results+"/*.bin"):
|
||||
os.remove(el)
|
||||
for el in files_bin_names:
|
||||
os.remove(os.path.join(repertory_results, el))
|
||||
|
||||
@timer
|
||||
def export(self, study, repertory, mage_rep, qlog=None, name="0"):
|
||||
|
|
|
|||
Loading…
Reference in New Issue