The display format of the value is given as follows.
>>> attr_proxy.get_config().format
'%.2f'
I didn’t find in the documentation (PyTango API) a function that formats a string according to this format (to obtain “2.70” in this case). Of course I can code it, but I would like to use a Python API function.
I don’t see anything like that in PyTango. Where do you think we should add it? A method on AttributeProxy? A general utility function? Please propose some options with the function/method signature, and expected behaviour.
Taurus has that kind of thing built in for GUIs, but it would be nice to have in PyTango as well.
Thank you for your prompt response. I will code a solution and propose it in the GitLab project (pytango) if possible (?). Can I propose such a GitLab ticket in order to have a discussion and a follow-up?
I don’t see yet if this would be a feature in AttributeProxy or a general utility function.
It is also about capturing the wrong formatting according to the type of data…
Thanks, I saw your nicely detailed proposal. The PyTango developers are focused on the 9.4.0 release at the moment, but once that is done we can look into this proposal.