aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/basic.py
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 22:24:42 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-12-30 22:24:42 -0500
commit17eb059ed39d994084a8aa898dd09b5b4e114dba (patch)
tree2e9e174216b7a8cf631d0a3699398ddba6b18f1a /qolab/hardware/basic.py
parented558b646e96d2b3ff95976eaaacb9722240b452 (diff)
downloadqolab-17eb059ed39d994084a8aa898dd09b5b4e114dba.tar.gz
qolab-17eb059ed39d994084a8aa898dd09b5b4e114dba.zip
BasicInstrument now has __repr__
Diffstat (limited to 'qolab/hardware/basic.py')
-rw-r--r--qolab/hardware/basic.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/qolab/hardware/basic.py b/qolab/hardware/basic.py
index dab32ab..5e8d17d 100644
--- a/qolab/hardware/basic.py
+++ b/qolab/hardware/basic.py
@@ -21,7 +21,21 @@ class BasicInstrument:
self.deviceProperties = [];
def __repr__(self):
- s = f'{self.config}'
+ s = ''
+ s += f'{self.__class__.__name__}('
+ s += 'config={'
+ cstr=[]
+ for k, v in self.config.items():
+ if v is not None:
+ cstr.append(
+ f"'{k}'"
+ ': '
+ f"'{v}'")
+ s += ', '.join(cstr)
+ s += '}'
+ if self.tsdb_ingester is not None:
+ s += f', tsdb_ingester={self.tsdb_ingester}'
+ s += ')'
return(s)
def tsdb_append(f):