Index: protocols/python/Makefile.in
===================================================================
--- protocols/python/Makefile.in	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/Makefile.in	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,11 @@
+-include config.mak
+
+all: bpython.$(SHARED_EXT)
+
+bpython.$(SHARED_EXT): @srcdir@/src/bpython.c
+	$(CC) $(CFLAGS) $(SHARED_FLAGS) -o bpython.$(SHARED_EXT) @srcdir@/src/bpython.c $(LDFLAGS)
+
+install: all
+	$(INSTALL) -d $(DESTDIR)$(plugindir)
+	$(INSTALL) bpython.$(SHARED_EXT) $(DESTDIR)$(plugindir)
+
Index: protocols/python/README.md
===================================================================
--- protocols/python/README.md	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/README.md	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,26 @@
+# bitlbee-python
+
+Bitlbee-python will allow bitlbee plugins to be written as Python scripts.
+
+It will scan the plugins directory for .py files and register them with bitlbee as protocols.
+
+## Installation
+
+The provided `bootstrap.sh` provides the bare minimum setup to get going.
+
+```
+$ ./bootstrap.sh
+[configure output]
+
+To make: cd BUILD; make; make install
+```
+
+If you have installed bitlbee in a non-standard location, provide a different PKG_CONFIG_PATH environment variable to bootstrap.sh (or ./configure), eg:
+
+```
+PKG_CONFIG_PATH=/opt/bitlbee-bzr/lib/pkgconfig/ ./configure
+```
+
+## Usage
+
+To do! Currently this project is a work in progress.
Index: protocols/python/bootstrap.sh
===================================================================
--- protocols/python/bootstrap.sh	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/bootstrap.sh	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+cp $(ls /usr/share/automake-*/install-sh | tail -n1) ./
+
+autoconf 
+
+mkdir -p BUILD
+cd BUILD
+../configure
+
+echo "To make: cd BUILD; make; make install"
+echo
Index: protocols/python/config.mak.in
===================================================================
--- protocols/python/config.mak.in	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/config.mak.in	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,14 @@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+SHARED_FLAGS = @SHARED_FLAGS@
+SHARED_EXT = @SHARED_EXT@
+BITLBEE = @BITLBEE@
+ASCIIDOC = @ASCIIDOC@
+INSTALL = @INSTALL@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+plugindir = ${libdir}/bitlbee
+datarootdir = @datarootdir@
+mandir = @mandir@
Index: protocols/python/configure.ac
===================================================================
--- protocols/python/configure.ac	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/configure.ac	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,75 @@
+AC_INIT([Bitlbee Python plugin], 0.1, [https://github.com/flexo/minecraftswitch/issues], bitlbee-python, [https://github.com/flexo/minecraftswitch])
+AC_MSG_NOTICE([Configuring bitlbee-python...])
+
+AC_PROG_CC
+AC_PROG_INSTALL
+
+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debug support (default: disabled)]), debug=yes)
+AC_MSG_CHECKING(for debug mode request)
+if test "x$debug" = "xyes" ; then
+        CFLAGS="-g -Wall -Werror"
+        AC_MSG_RESULT(yes)
+else
+        AC_MSG_RESULT(no)
+fi
+
+dnl Check for bitlbee
+AC_MSG_CHECKING(for BitlBee)
+if test -d /usr/local/lib/pkgconfig; then
+        PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
+        export PKG_CONFIG_PATH
+fi
+pkg-config --exists bitlbee
+if test "$?" != "0"; then
+        AC_MSG_RESULT(no)
+        BITLBEE="no"
+else
+        AC_MSG_RESULT(yes)
+        BITLBEE="yes"
+fi
+
+if test "$BITLBEE" = "no"; then
+        AC_ERROR([In order to use bitlbee-python you need BitlBee installed.])
+fi
+
+if test -z "$CFLAGS"; then
+        CFLAGS="`pkg-config --cflags bitlbee` `python-config --cflags`"
+else
+        CFLAGS="$CFLAGS `pkg-config --cflags bitlbee` `python-config --cflags`"
+fi
+if test -z "$LDFLAGS"; then
+        LDFLAGS="`pkg-config --libs bitlbee` `python-config --ldflags`"
+else
+        LDFLAGS="$LDFLAGS `pkg-config --libs bitlbee` `python-config --ldflags`"
+fi
+prefix=`pkg-config --variable=prefix bitlbee`
+
+case "`$CC -dumpmachine`" in
+        *linux*|*freebsd*|*netbsd*|*openbsd*)
+                SHARED_FLAGS="-fPIC -shared"
+                SHARED_EXT="so"
+                ;;
+        *apple-darwin*)
+                SHARED_FLAGS="-dynamiclib -undefined dynamic_lookup"
+                SHARED_EXT="dylib"
+                ;;
+        *)
+                AC_MSG_ERROR([Your machine is not yet supported])
+                ;;
+esac
+AC_SUBST(SHARED_FLAGS)
+AC_SUBST(SHARED_EXT)
+
+AC_OUTPUT(Makefile)
+AC_OUTPUT(config.mak)
+cp confdefs.h config.h
+
+echo "
+        BitlBee plugin:                 $BITLBEE
+        prefix:                         $prefix
+        install program:                $INSTALL
+        compiler flags:                 $CFLAGS
+        linker flags:                   $LDFLAGS
+        shared object flags:            $SHARED_FLAGS
+        shared object extension:        $SHARED_EXT"
+echo
Index: protocols/python/src/bpython.c
===================================================================
--- protocols/python/src/bpython.c	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
+++ protocols/python/src/bpython.c	(revision 007552708b7d8e68d99838fdfce8c83edfc9f403)
@@ -0,0 +1,44 @@
+/*
+ * bpython.c - Python plugin for bitlbee
+ * 
+ * Copyright (c) 2013 Nick Murdoch
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+#include <bitlbee.h>
+#include <Python.h>
+
+void init_plugin() {
+    struct prpl *ret = g_new0(struct prpl, 1);
+
+    printf("Initialising Python... ");
+    Py_Initialize();
+    PyRun_SimpleString("print 'Python initialised!'\n");
+    // Py_Finalize(); // TODO - there's no plugin_unload for us to do this in.
+
+    ret->name = "bpython";
+
+    register_protocol(ret);
+}
+
+int main(int argc, char ** argv) {
+    printf("This is a bitlbee plugin, you should place it in bitlbee's plugins directory.");
+    return 0;
+}
