title: trying to support python code in tcl
body: <p>I'm new to all of this thing, and so please excuse me if i kinda did something stupid here. Treat me and explain to me as if i'm a total noob would be helpful.</p>
  
  <p>I have a simple function written in python, filename <code>a.pyx</code>:-</p>
  
  <pre><code>#!/usr/bin/env python
  
  import os
  import sys
  
  def get_syspath():
      ret = sys.path
      print "Syspath:{}".format(ret)
      return ret
  </code></pre>
  
  <p>I want it to be able to be used by tcl.</p>
  
  <p>I read thru the cython page, and followed.</p>
  
  <p>I ran this:-</p>
  
  <pre><code>cython -o a.c a.pyx
  </code></pre>
  
  <p>I then ran this command to generate the object file <code>a.o</code>:-</p>
  
  <pre><code>gcc -fpic -c a.c -I/usr/local/include -I/tools/share/python/2.7.1/linux64/include/python2.7 
  </code></pre>
  
  <p>And then ran this to generate the so file <code>a.so</code>:-</p>
  
  <pre><code>gcc -shared a.o -o a.so
  </code></pre>
  
  <p>when i load it from a tclsh, it failed.</p>
  
  <pre><code>$tclsh
  % load ./a.so
  couldn't load file "./a.so": ./a.so: undefined symbol: PyExc_RuntimeError
  </code></pre>
  
  <p>Am i taking the correct path here? If not, can please explain to me what went wrong, and what should I be doing?</p>
  
  <p>Thanks in advance.</p>