What?

Using goPy in combination with gccgo it is possible to write CPython extension modules in Go. Once the libraries and command-line tool are installed, the "gopy" command-line tool takes care of generating the necessary C interface code and using gccgo to compile the code into an extension module.

Caveats

There are a few things that should be made clear:

  1. Calling Go code from a second thread will currently cause the code to raise an exception (i.e. all calls into Go code must be made from the same thread)
  2. Both the goPy bindings and the gccgo specific extension support code have only undergone the lightest of testing
  3. The 32 bit version hasn't been tested at all, I actually only built the deb to stop apt-get from complaining
  4. When using goroutines py.Lock must be used. No other GIL or threading interface functions have been tested - and they most likely will not work.
  5. Essentially this code is alpha quality at best, and currently primarily exists as proof that it is possible.