title: Converting GSL ODE solver to Python
body: <p>I solve a set of couples ODEs which I solve using the GSL ODE solver similar to this <a href="http://www.gnu.org/software/gsl/manual/html_node/ODE-Example-programs.html" rel="nofollow">example</a>. Currently this is automates by writing a file in python e.g</p>
  
  <pre><code>text = """
  #include &lt;stdio.h&gt;
  #include &lt;gsl/gsl_errno.h&gt;
  
  ...
  
  """
  </code></pre>
  
  <p>Then replacing strings in <code>text</code> with the relevant words and writing to a file <code>script.c</code>. I then using <code>os.system</code> to run it e.g</p>
  
  <pre><code>os.system("gcc -Wall -I/usr/local/include -c script.c")
  os.system("gcc -static script.o -lgsl -lgslcblas -lm")
  os.system("./a.out &gt;  %s" % (file_name) )
  </code></pre>
  
  <p>All of this very inelegant and so I have been reading about alternatives and have stumbled PyGSL, CythonGSL so far. These seem to lack proper documentation and I'm not really smart enough to work out how they work!</p>
  
  <p>Any advise would be appreciated.</p>