Thanks for the quick reply Tim!
I looked up the Python documentation and yes - it is in PEP 3101. I have Python 2.7.3 on my dev box and str.format works fine there. But I understand that is different from Jython implementation and wouldn't expect it.
However, before posting this question, I looked up the Jython documentation
http://www.jython.org/docs/library/string.html#string-formatting (section 7.1.3 Format String Syntax) and it did specify str.format. At the top of the page, the breadcrumbs says "Jython v2.5.2 documentation", but it could be a documentation bug too!
Just noticed in Jython website that they have two other versions coming up:
Jython 2.5.4rc1
Jython 2.7beta1
"The Jython 2.7beta1 release is also available for download. Jython 2.7b1 brings us up to language level compatibility with the 2.7 version of CPython. We have focused largely on CPython compatibility, and so this release of Jython can run more pure Python apps then any previous release."
Hoping to see vertx with Jython 2.7 soon :)
Now, to the actual reason why I got into this: I want to parse REST request JSON payload and also generate JSON responses. I tried to "import json" and it was not available. So, I copied (I know - that throws away portability and all - just wanted to try!) over the json folder from my local Python 2.7.1 lib to the same folder where my verticle file is. Then ran the verticle and it failed with the str.format as listed above.
Is there a vertx native way to do JSON in a python verticle ? Or, is that limited by the Jython version too ? Thanks again for helping me.
-Venkat