diff --git a/artiq/coredevice/comm_kernel.py b/artiq/coredevice/comm_kernel.py index 9e5711bf6..8bb8305d8 100644 --- a/artiq/coredevice/comm_kernel.py +++ b/artiq/coredevice/comm_kernel.py @@ -5,6 +5,7 @@ import numpy import socket import re import linecache +import os from enum import Enum from fractions import Fraction from collections import namedtuple @@ -12,7 +13,6 @@ from collections import namedtuple from artiq.coredevice import exceptions from artiq.coredevice.comm import initialize_connection from artiq import __version__ as software_version -from artiq.coredevice.runtime import source_loader from artiq import __artiq_dir__ as artiq_dir @@ -175,6 +175,16 @@ class CommKernelDummy: pass +class SourceLoader: + def __init__(self, runtime_root): + self.runtime_root = runtime_root + + def get_source(self, filename): + with open(os.path.join(self.runtime_root, filename)) as f: + return f.read() + +source_loader = SourceLoader(os.path.join(artiq_dir, "soc", "runtime")) + class CoreException: """Information about an exception raised or passed through the core device.""" diff --git a/artiq/coredevice/runtime.py b/artiq/coredevice/runtime.py deleted file mode 100644 index 4d65e86d8..000000000 --- a/artiq/coredevice/runtime.py +++ /dev/null @@ -1,14 +0,0 @@ -import os - -from artiq import __artiq_dir__ as artiq_dir - - -class SourceLoader: - def __init__(self, runtime_root): - self.runtime_root = runtime_root - - def get_source(self, filename): - with open(os.path.join(self.runtime_root, filename)) as f: - return f.read() - -source_loader = SourceLoader(os.path.join(artiq_dir, "soc", "runtime"))