title: Python library for string formatting with custom placeholders
body: <p>I am searching for a Python library for string formatting with custom placeholders. What I mean is that I would like to be able to define a string like <code>"%f %d %3c"</code> where for example <code>%f</code> would be then replaced with some filename, <code>%d</code> with a directory name and <code>%3c</code> with a counter with three digits. Or something. It does not have to be printf-like but it would be great if it would be. So I would like to be able to define what each letter means, is it string or number, and also some formatting (like number of digits) data.</p>
  
  <p>The idea is that user can specify the format and I then fill it in with data. Like datefmt works. But for custom things.</p>
  
  <p>Is there something like that already made for Python (2.5+, sadly not for 2.7 and 3 and its <code>__format__</code>)?</p>