Add device property to PyLimeConfig

Introduced a getter and setter for the 'device' property, allowing for
UTF-8 encoding/decoding of the device string in the PyLimeConfig class.
This enhances string handling consistency across the interface.
This commit is contained in:
Kumi 2024-02-17 17:46:07 +01:00
parent f48c034011
commit 0696cc3b20
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -660,6 +660,14 @@ cdef class PyLimeConfig:
self._config.c3_synth[i] = values[i]
# String properties
@property
def device(self):
return self._config.device.decode('utf-8')
@device.setter
def device(self, str value):
self._config.device = value.encode('utf-8')
@property
def file_pattern(self):
return self._config.file_pattern.decode()