How about supporting extended sprintf syntax? From the manpage:

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

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

i.e. "%'d" % 12345678