title: Blender 2.6: Select object by name through Python
body: <p>How do you select objects by name through Python in Blender 2.6?</p>
  
  <p>In <strong>2.4-2.5</strong>, one could simply use:</p>
  
  <pre><code>bpy.ops.object.select_name("OBJECT")
  </code></pre>
  
  <p>... but this has been discontinued in <strong>2.6</strong>, to be replaced by what?</p>
  
  <hr>
  
  <p>In <strong>2.6</strong>, one can get the currently selected objects like so...</p>
  
  <pre><code>bpy.context.selected_objects
  </code></pre>
  
  <p>And there's a way to set the scene's active object...</p>
  
  <pre><code>bpy.context.scene.objects.active = bpy.data.objects["OBJECT"]
  </code></pre>
  
  <p>And one can also select via <em>operations</em>, like <code>select_all()</code> or <code>select_by_type()</code>...</p>
  
  <pre><code>bpy.ops.object.select_all(action="TOGGLE")
  </code></pre>
  
  <p>But I can't find a way to select simply by <em>name.</em></p>
  
  <p>Thanks very much.</p>