title: Add new method to a Python Swig Template class
body: <p>I need to add a new method to my swig template class, for example:</p>
  
  <p>I am declaring a template class in myswig.i as follows:</p>
  
  <pre><code>%template(DoubleVector) vector&lt;double&gt;;
  </code></pre>
  
  <p>this will generate a class named "DoubleVector" in the generated .py file with some generated methods. lets suppose they are func1(), func2() and func3(). 
  These are generated functions and i have no control over them.
  Now, if I want to add a new method called "func4()" to this class(DoubleVector), how may I do it? Is it possible? </p>
  
  <p>I know of a identifier called %pythoncode but I could not use it to define a new function in this template class.</p>