<div dir="ltr">Hi Rob,<div><br></div><div>Yes, you can access those attributes, but you have to work with the phil object, not the extract. Here is some sample code. There is more code in the libtbx/phil/interface.py that builds some dictionaries for tracking these values.</div><div><br></div><div><font face="monospace">arrayinfo_phil_str = &quot;&quot;&quot;<br>selected_info {<br>   span = True<br>     .type = bool<br>     .short_caption = &quot;Span&quot;<br>   minmax_data = True<br>     .type = bool<br>     .short_caption = &quot;min,max data&quot;<br>}<br>&quot;&quot;&quot;<br><br>def recursive_show(phil_object):<br>  for o in phil_object.objects:<br>    if o.is_scope:<br>      recursive_show(o)<br>    elif o.is_definition:<br>      # o.show()<br>      print(&#39;My name is&#39;, <a href="http://o.name">o.name</a>)<br>      print(&#39;My value is&#39;, str(o.words[0]))<br>      print(&#39;My type is&#39;, str(o.type))<br>      print(&#39;My short_caption is&#39;, o.short_caption)<br>      print(&#39;My full path is&#39;, o.full_path())<br>      # print(dir(o))<br><br>from libtbx.phil import parse<br>p = parse(arrayinfo_phil_str)<br>recursive_show(p)</font><br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div>--</div><div><span style="font-size:12.8000001907349px">Billy K. Poon</span><br></div></div><div>Research Scientist, Molecular Biophysics and Integrated Bioimaging</div><div>Lawrence Berkeley National Laboratory</div><div>1 Cyclotron Road, M/S 33R0345</div><div>Berkeley, CA 94720</div><div>Fax: (510) 486-5909</div><div>Web: <a href="https://phenix-online.org" target="_blank">https://phenix-online.org</a></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 14, 2021 at 4:40 PM Robert Oeffner &lt;<a href="mailto:rdo20@cam.ac.uk">rdo20@cam.ac.uk</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Most likely a trivial question but if I have a PHIL object such as one <br>
based on the string<br>
<br>
arrayinfo_phil_str = &quot;&quot;&quot;<br>
selected_info {<br>
   span = True<br>
     .type = bool<br>
     .short_caption = &quot;Span&quot;<br>
   minmax_data = True<br>
     .type = bool<br>
     .short_caption = &quot;min,max data&quot;<br>
}<br>
&quot;&quot;&quot;<br>
<br>
I can then get the PHIL definitions span and minmax_data as python <br>
values like:<br>
<br>
from libtbx.phil import parse<br>
parse(arrayinfo_phil_str).extract().selected_info.span<br>
parse(arrayinfo_phil_str).extract().selected_info.minmax_data<br>
<br>
But how do I access the values of the short_caption attribute of these <br>
definitions? Does that make sense or have not understood correctly how <br>
PHIL works?<br>
<br>
<br>
Thanks,<br>
<br>
<br>
Rob<br>
<br>
<br>
<br>
<br>
-- <br>
This email has been checked for viruses by AVG.<br>
<a href="https://www.avg.com" rel="noreferrer" target="_blank">https://www.avg.com</a><br>
<br>
_______________________________________________<br>
cctbxbb mailing list<br>
<a href="mailto:cctbxbb@phenix-online.org" target="_blank">cctbxbb@phenix-online.org</a><br>
<a href="http://phenix-online.org/mailman/listinfo/cctbxbb" rel="noreferrer" target="_blank">http://phenix-online.org/mailman/listinfo/cctbxbb</a><br>
</blockquote></div>