You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is by far the best QRcode tool in python I can find, except this minor problem...
After I create the object using code = pyqrcode.create("somedata"), I find no way to change the data once the object is created. In other words, there is no function like update(self, data), which allows the data to be updated.
PS. I have tried to change the content through code.content = "something different", but it doesn't change anything. After I read the code I know this is not possible because there is no function in the class QRcode that could update the backend builder class.
I know I can simply create a new object with different content, but isn't it better to reuse the object?
The text was updated successfully, but these errors were encountered:
An update(self, data) method would require an additional method, like "make(self)" to know when the QR Code should be updated or each invocation of "update(self, data)" would require a new calculation of the internals of QR code (checking the input, calculating the data and error code words, finding a mask, etc.).
Do you think that the object creation is too expensive or why do want an update method?
This is by far the best QRcode tool in python I can find, except this minor problem...
After I create the object using
code = pyqrcode.create("somedata")
, I find no way to change the data once the object is created. In other words, there is no function likeupdate(self, data)
, which allows the data to be updated.PS. I have tried to change the content through
code.content = "something different"
, but it doesn't change anything. After I read the code I know this is not possible because there is no function in the classQRcode
that could update the backend builder class.I know I can simply create a new object with different content, but isn't it better to reuse the object?
The text was updated successfully, but these errors were encountered: