예제 #1
0
    def start(self):
        # Create Queue and redirect sys.stdout to this queue
        out_queue = Queue()
        sys.stdout = WriteStream(out_queue)
        err_queue = Queue()
        sys.stderr = WriteStream(err_queue)

        self.stderr_file = open(self.stderr_filename, 'a')

        self.thread = AllOutputThread(out_queue, err_queue)
        self.thread.outsignal.connect(self.append_stdout)
        self.thread.errsignal.connect(self.append_stderr)
        self.thread.start()

        print('Started logging at  ' + datetime.now().strftime("%H:%M:%S"))
        self.stderr_file.write('Started logging at  ' +
                               datetime.now().strftime("%H:%M:%S") + '\n')
        # self.stdout_file.close()
        self.stderr_file.close()

        start_all_logging()
예제 #2
0
    print_fpga_info, config_fpga_debug_log, print_fpga_log
from keysight_fpga.sd1.dig_iq import load_iq_image

from keysight_fpga.qcodes.M3202A_fpga import M3202A_fpga
from core_tools.drivers.M3102A import SD_DIG, MODES

from core_tools.HVI2.hvi2_schedule_loader import Hvi2ScheduleLoader
from core_tools.HVI2.hvi2_video_mode import Hvi2VideoMode
from pulse_lib.base_pulse import pulselib

import qcodes

import qcodes.logger as logger
from qcodes.logger import start_all_logging

start_all_logging()
logger.get_file_handler().setLevel(logging.DEBUG)

# close objects still active since previous run (IPython)
try:
    oldLoader.close_all()
except:
    pass
oldLoader = Hvi2ScheduleLoader

try:
    qcodes.Instrument.close_all()
except:
    pass