Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'python': 0.08; 'received:64.4': 0.09; 'subject:string': 0.09; 'library': 0.15; '2.6,': 0.16; 'str.format()': 0.16; 'string:': 0.16; 'parse': 0.23; 'versions': 0.23; 'thanks': 0.28; 'version': 0.29; 'optimal': 0.30; 'subject:format': 0.30; "skip:' 10": 0.32; 'to:addr:python-list': 0.33; 'question': 0.34; 'there': 0.35; 'header:User-Agent:1': 0.35; 'using': 0.35; 'charset:us-ascii': 0.36; 'subject:from': 0.38; 'but': 0.38; 'earlier': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'serving': 0.66 Date: Mon, 20 Jun 2011 10:14:46 -0800 From: Tim Johnson To: Python ML Subject: Parsing a dictionary from a format string MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Organization: AkWebsoft User-Agent: Mutt/1.5.20 (2009-06-14) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308593682 news.xs4all.nl 49178 [::ffff:82.94.164.166]:54499 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:8023 Currently using python 2.6, but am serving some systems that have older versions of python (no earlier than. Question 1: With what version of python was str.format() first implemented? Question 2: Given the following string: S = 'Coordinates: {latitude}, {longitude}' Is there a python library that would provide an optimal way to parse from S the following {'latitude':"",'longitude':""} ? Thanks -- Tim tim at johnsons-web dot com or akwebsoft dot com http://www.akwebsoft.com