summaryrefslogtreecommitdiff
path: root/esds/platform.py
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2022-09-13 10:46:44 +0200
committerLoic Guegan <manzerbredes@mailbox.org>2022-09-13 10:46:44 +0200
commite188ca4040ba59b7e61402a3d48c888463b3a4bd (patch)
treeb6b72ca4838b4b3edf4b6cdf82356e71365fe840 /esds/platform.py
parent3ae36dadc19f62d2da64915e18f26da9aa65c314 (diff)
Debug entry point
Diffstat (limited to 'esds/platform.py')
-rw-r--r--esds/platform.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/esds/platform.py b/esds/platform.py
index 144e552..6742e9d 100644
--- a/esds/platform.py
+++ b/esds/platform.py
@@ -1,7 +1,7 @@
import yaml, os, importlib
import numpy as np
-import Simulator
+from .simulator import Simulator
class UnitsParser:
def node_range(r,limit):
@@ -46,6 +46,7 @@ class YAMLPlatformFile:
def __init__(self, file_path):
self.file_path=file_path
+ self.location=os.path.dirname(os.path.abspath(file_path))
self.default={
"breakpoints": [],
"breakpoints_every": None,
@@ -152,7 +153,7 @@ class YAMLPlatformFile:
words=impl.split()
r=UnitsParser.node_range(words[0],self.default["node_count"])
file="".join(words[1:])
- if not os.path.exists(file):
+ if not os.path.exists(os.path.join(self.location,file)):
self.parsing_error("File "+file+ " not found")
path, extension = os.path.splitext(file)
if extension != ".py":