pygettext: Seen unexpected token "%"
I am currently trying to implement internationalization in an application (Python 2.6) and have run into an error involving string formatting.
A string marked translatable looks like this:

`foo = _("I would like to have %d pounds of cheese" % amount)`

Running `pygettext` on my source tree then complains when it hits this line:

    $ pygettext .
    *** ./foobar.py:45: Seen unexpected token "%"

The resulting `messages.pot` file does not contain the string after pygettext has done its work.
What is the way to go for string formatting with gettext?
pygettext: Seen unexpected token "%"
===

I am currently trying to implement internationalization in an application (Python 2.6) and have run into an error involving string formatting.
A string marked translatable looks like this:

`foo = _("I would like to have %d pounds of cheese" % amount)`

Running `pygettext` on my source tree then complains when it hits this line:

    $ pygettext .
    *** ./foobar.py:45: Seen unexpected token "%"

The resulting `messages.pot` file does not contain the string after pygettext has done its work.
What is the way to go for string formatting with gettext?