Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to call values from dictionary

2011-11-25 Thread Jeff Hardy
On Thu, Nov 24, 2011 at 11:12 PM, Ossi Heinonen wrote: > Hi again > > Could it be possible to use some sort of wildcard method in this one? Like > >    verifiedValues['*P1*'] > > or > >    verifiedValues['?P1?'] > > Just a thought that seems intuitive, but is it doable? No, that won't work with a

Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to call values from dictionary

2011-11-25 Thread Ossi Heinonen
On 25.11.2011 10:30, Jeff Hardy wrote: On Thu, Nov 24, 2011 at 11:12 PM, Ossi Heinonen wrote: Hi again Could it be possible to use some sort of wildcard method in this one? Like verifiedValues['*P1*'] or verifiedValues['?P1?'] Just a thought that seems intuitive, but is it doable?

Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to callvalues from dictionary

2011-11-25 Thread Ossi Heinonen
Hi Eyvind That gives me print verifiedValues[dict.keys(verifiedValues)[0]] 5.5 [mm] Which is pretty damn exactly what I need! Thank you very much! The only problem now is that the order of the keys seems a bit random but maybe I can find some pattern for that. Thanks again! - Ossi

Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to callvalues from dictionary

2011-11-25 Thread Markus Schaber
Hi, Von: Ossi Heinonen > That gives me > >print verifiedValues[dict.keys(verifiedValues)[0]] >5.5 [mm] > >Which is pretty damn exactly what I need! Thank you very much! The only >problem now is that the order of the keys seems a bit random but maybe I can >find some pattern for that.

Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to callvalues from dictionary

2011-11-25 Thread Steve Dower
Probably the keys aren't actually strings but repr() has been overridden. You could copy the dict with dict((repr(key), verifiedValues[key]) for key in verifiedValues) to get one like you expect (though it may add quotes around the key). Or you can print type(verifiedValues.keys()[0]) and see

Re: [Ironpython-users] Scripting Ansys with IronPython - Unable to callvalues from dictionary

2011-11-25 Thread Eyvind Axelsen
What happens if you try the following? print verifiedValues[dict.keys(verifiedValues)[0]] Eyvind. -Original Message- From: [email protected] on behalf of Ossi Heinonen Sent: Thu 24.11.2011 09:54 To: [email protected] Subject: [Iro