title: How to fix "TraitError: The 'input' trait of a ... instance is 'read only'."
body: <p>I have always preferred the more pythonic tvtk over vtk's raw Python API, but with the latest versions I get from MacPorts, I have the problem that basic things don't work anymore.  The following snippet is taken from the <a href="http://docs.enthought.com/mayavi/tvtk/README.html#basic-usage" rel="nofollow">tvtv documentation</a>:</p>
  
  <pre><code>from tvtk.api import tvtk
  cs = tvtk.ConeSource()
  cs.resolution = 36
  m = tvtk.PolyDataMapper()
  m.input = cs.output # &lt;== fails here
  a = tvtk.Actor()
  a.mapper = m
  p = a.property
  p.representation = 'w'
  print p.representation
  </code></pre>
  
  <p>With every initialization of 'input' traits, I get an error like</p>
  
  <pre><code>TraitError: The 'input' trait of a PolyDataMapper instance is 'read only'.
  </code></pre>
  
  <p>I have found many similar questions, bug reports etc., but they all point to changes related to VTK 6 (<code>SetInputData</code> and <code>SetInputConnection</code> instead of <code>SetInput</code>), which <a href="https://github.com/enthought/mayavi/issues/74" rel="nofollow">should be supported in Mayavi 4.4.2</a>, and I am having:</p>
  
  <pre><code>vtk @6.3.0_0+python27 (active)
  py27-traits @4.5.0_0 (active)
  py27-traitsui @5.0.0_0 (active)
  py27-apptools @4.3.0_0 (active)
  py27-envisage @4.4.0_0 (active)
  py27-pyface @5.0.0_0+pyqt4 (active)
  py27-mayavi @4.4.3_0 (active)
  </code></pre>
  
  <p>The <code>PolyDataMapper</code> has the following input-traits:</p>
  
  <pre><code>'input': &lt;traits.traits.CTrait at 0x11b23a260&gt;,
  'input_algorithm': &lt;traits.traits.CTrait at 0x119516520&gt;,
  'input_as_data_set': &lt;traits.traits.CTrait at 0x11b230470&gt;,
  'input_connection': &lt;traits.traits.CTrait at 0x119516310&gt;,
  'input_executive': &lt;traits.traits.CTrait at 0x1195165d0&gt;,
  'input_information': &lt;traits.traits.CTrait at 0x119516680&gt;,
  </code></pre>