diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-30 22:24:42 -0500 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2021-12-30 22:24:42 -0500 |
commit | 17eb059ed39d994084a8aa898dd09b5b4e114dba (patch) | |
tree | 2e9e174216b7a8cf631d0a3699398ddba6b18f1a /qolab | |
parent | ed558b646e96d2b3ff95976eaaacb9722240b452 (diff) | |
download | qolab-17eb059ed39d994084a8aa898dd09b5b4e114dba.tar.gz qolab-17eb059ed39d994084a8aa898dd09b5b4e114dba.zip |
BasicInstrument now has __repr__
Diffstat (limited to 'qolab')
-rw-r--r-- | qolab/hardware/basic.py | 16 |
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): |