Skip to content
Snippets Groups Projects
Commit 94448695 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann 🌱
Browse files

rename and clean

parent 84ba1c1b
No related branches found
No related tags found
No related merge requests found
...@@ -9,8 +9,6 @@ def read_data(filename): ...@@ -9,8 +9,6 @@ def read_data(filename):
dict = {"t":[],"Pxi":[],"Pxe":[],"Qxi":[],"Qxe":[]} dict = {"t":[],"Pxi":[],"Pxe":[],"Qxi":[],"Qxe":[]}
with open(filename, 'r') as file: with open(filename, 'r') as file:
for line in file: for line in file:
#match = re.match(r"\|t =\s*([\d.]+)\| Pxi =\s*([\d.E+-]+)\| Qxi =\s*([\d.E+-]+)\|", line)
a = line.split('|') a = line.split('|')
for i in a[1:-1]: for i in a[1:-1]:
b = i.split('=') b = i.split('=')
...@@ -25,7 +23,6 @@ if __name__ == "__main__": ...@@ -25,7 +23,6 @@ if __name__ == "__main__":
filename = sys.argv[1] filename = sys.argv[1]
dict = read_data(filename) dict = read_data(filename)
print(dict)
time = dict["t"] time = dict["t"]
dict.pop('t',None) dict.pop('t',None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment