Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def initialize(self, *args, **kwargs):
# open control
self.ctrl = yaqc.Client(self._yaqd_port)
# import some information from control
id_dict = self.ctrl.id()
self.serial_number = id_dict["serial"]
self.position.write(self.ctrl.get_position())
# recorded
self.recorded["wm"] = [self.position, "nm", 1.0, "m", False]
while self.is_busy():
time.sleep(0.1)
# finish
self.initialized.write(True)
self.initialized_signal.emit()
def _load_google_drive(self):
google_drive_ini = ini.Ini(os.path.join(g.main_dir.read(), "project", "google_drive.ini"))
g.google_drive_enabled.write(google_drive_ini.read("main", "enable"))
if g.google_drive_enabled.read():
g.google_drive_control.write(yaqc.Client(google_drive_ini.read("main", "port")))