Is it ok if I write something like this here instead?
    cmd += locale.format_string('%f', num)