title: Maya Python: how to reference a file and immediately select a child from that referenced file
body: <p>I need write a python script for automation, I need to do following:</p>
  
  <ul>
  <li>Reference a file</li>
  <li>After the file is referenced,  immediately select its one of its children.</li>
  </ul>
  
  <p>For example: The structure of the reference file is like this:</p>
  
  <ul>
  <li>rig_grp
  
  <ul>
  <li>-> control_grp</li>
  <li>-> model_grp</li>
  </ul></li>
  </ul>
  
  <p>My attempt was this:</p>
  
  <pre><code>import maya.cmds as cmds
  
  cmds.file("M:/.../rig.ma", r=True, ignoreVersion = True, namespace = "Rig")
  </code></pre>
  
  <p>Above codes reference the rig file, my Question is: How to select <strong>control_grp</strong>, immediately after the rig file is imported. </p>