aboutsummaryrefslogtreecommitdiff
path: root/makeBoundary.py
diff options
context:
space:
mode:
authorPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-01 12:34:38 +0100
committerPaul Garlick <pgarlick@tourbillion-technology.com>2019-10-01 12:34:38 +0100
commit956aaf8ad683c85fc723e73c54674c8108207c92 (patch)
tree2ae8be61220077d0e028d2177833ca680c1fdb38 /makeBoundary.py
parentda737763230728774c728b616990b4bd6cc2dc43 (diff)
downloadfullSWOF-utils-956aaf8ad683c85fc723e73c54674c8108207c92.tar.gz
use ast module to evaluate items read from boundary definition file.
Diffstat (limited to 'makeBoundary.py')
-rwxr-xr-xmakeBoundary.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/makeBoundary.py b/makeBoundary.py
index 1fc6b69..21b1113 100755
--- a/makeBoundary.py
+++ b/makeBoundary.py
@@ -3,6 +3,7 @@
import matplotlib.pyplot as plt
import numpy as np
import bisect
+import ast
def read_definition(filename):
ddict = {}
@@ -10,7 +11,7 @@ def read_definition(filename):
for line in f:
items = line.split(': ', 1)
if len(items) == 2:
- ddict[items[0]] = eval(items[1])
+ ddict[items[0]] = ast.literal_eval(items[1])
return ddict
# read boundary definition file.