How about supporting extended sprintf syntax? From the manpage:

       The five flag characters above are defined  in  the  C  standard. he
       SUSv2 specifies one further flag character.

       '      For decimal conversion (i, d, u, f, F, g, G) the output is o be
              grouped with thousands' grouping characters if the locale nfor              mation  indicates any.  Note that many versions of gcc(1) annot
              parse this option and will issue  a  warning.   SUSv2 oes  not
              include %'F.

i.e. "%'d" % 12345678