Re: Varable parsing error with python

2015-02-10 Thread Dave Angel
On 02/10/2015 03:29 AM, OmPs wrote: On 10 Feb 2015 13:12, Chris Angelico ros...@gmail.com wrote: On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if isinstance(fpmdict[application][package], list):

Re: Varable parsing error with python

2015-02-10 Thread OmPs
On 10 Feb 2015 13:12, Chris Angelico ros...@gmail.com wrote: On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if isinstance(fpmdict[application][package], list): for i in

Re: Varable parsing error with python

2015-02-10 Thread OmPs
On 10 Feb 2015 13:59, OmPs torque.in...@gmail.com wrote: On 10 Feb 2015 13:12, Chris Angelico ros...@gmail.com wrote: On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if

Re: Varable parsing error with python

2015-02-10 Thread Denis McMahon
On Tue, 10 Feb 2015 18:39:42 +1100, Chris Angelico wrote: On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if isinstance(fpmdict[application][package], list): for i in

Re: Varable parsing error with python

2015-02-10 Thread Dave Angel
On 02/10/2015 01:24 PM, Denis McMahon wrote: On Tue, 10 Feb 2015 18:39:42 +1100, Chris Angelico wrote: On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if isinstance(fpmdict[application][package],

Re: Varable parsing error with python

2015-02-10 Thread Steven D'Aprano
OmPs wrote: On 10 Feb 2015 13:59, OmPs torque.in...@gmail.com wrote: Tried that as well getting the same error. I feel its something to do with variable substitution. Python doesn't do variable substitution. At least not the way I think of it. What do you mean by variable substitution?

Re: Varable parsing error with python

2015-02-09 Thread Chris Angelico
On Tue, Feb 10, 2015 at 6:30 PM, OmPs torque.in...@gmail.com wrote: def _getPackgeVersion(xmlfile, p): package = str(p) if isinstance(fpmdict[application][package], list): for i in fpmdict[application][package]: if i[@name] == p:

Varable parsing error with python

2015-02-09 Thread OmPs
In an XML file which contain a tag and then these tags contain properties, which later are being called in anoter tag where these properties are expanded as variables. For eg. instance name='instancename' user='test' group='test' fullname='test%20-%20dev%20app' property