Index: sansmodels/src/sans/models/c_extensions/CCoreShellModel.c
===================================================================
--- sansmodels/src/sans/models/c_extensions/CCoreShellModel.c	(revision ae3ce4eaa593202ebf49122e196897c0d45a25b6)
+++ sansmodels/src/sans/models/c_extensions/CCoreShellModel.c	(revision 9316609c953db33f23a48a9b91ce5b283ea935f4)
@@ -1,3 +1,3 @@
-/** CCoreShellModel
+/** [PYTHONCLASS]
  *
  * C extension 
@@ -20,5 +20,5 @@
 
 /// Error object for raised exceptions
-static PyObject * CCoreShellModelError = NULL;
+static PyObject * [PYTHONCLASS]Error = NULL;
 
 
@@ -32,9 +32,9 @@
     /// Model parameters
 	CoreShellParameters model_pars;
-} CCoreShellModel;
+} [PYTHONCLASS];
 
 
 static void
-CCoreShellModel_dealloc(CCoreShellModel* self)
+[PYTHONCLASS]_dealloc([PYTHONCLASS]* self)
 {
     self->ob_type->tp_free((PyObject*)self);
@@ -44,9 +44,9 @@
 
 static PyObject *
-CCoreShellModel_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
-    CCoreShellModel *self;
+    [PYTHONCLASS] *self;
     
-    self = (CCoreShellModel *)type->tp_alloc(type, 0);
+    self = ([PYTHONCLASS] *)type->tp_alloc(type, 0);
    
     return (PyObject *)self;
@@ -54,5 +54,5 @@
 
 static int
-CCoreShellModel_init(CCoreShellModel *self, PyObject *args, PyObject *kwds)
+[PYTHONCLASS]_init([PYTHONCLASS] *self, PyObject *args, PyObject *kwds)
 {
     if (self != NULL) {
@@ -80,8 +80,8 @@
 }
 
-static PyMemberDef CCoreShellModel_members[] = {
-    {"params", T_OBJECT, offsetof(CCoreShellModel, params), 0,
+static PyMemberDef [PYTHONCLASS]_members[] = {
+    {"params", T_OBJECT, offsetof([PYTHONCLASS], params), 0,
      "Parameters"},
-    {"log", T_OBJECT, offsetof(CCoreShellModel, log), 0,
+    {"log", T_OBJECT, offsetof([PYTHONCLASS], log), 0,
      "Log"},
     {NULL}  /* Sentinel */
@@ -92,5 +92,5 @@
     @return double
 */
-double CCoreShellModel_readDouble(PyObject *p) {
+double [PYTHONCLASS]_readDouble(PyObject *p) {
     if (PyFloat_Check(p)==1) {
         return (double)(((PyFloatObject *)(p))->ob_fval);
@@ -110,5 +110,5 @@
  * @return: function value
  */
-static PyObject * run(CCoreShellModel *self, PyObject *args) {
+static PyObject * run([PYTHONCLASS] *self, PyObject *args) {
 	double q_value, phi_value;
 	PyObject* pars;
@@ -129,6 +129,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -140,12 +140,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.run expects a double or a list of dimension 2.");
+	    	PyErr_SetString([PYTHONCLASS]Error, 
+	    		"[PYTHONCLASS].run expects a double or a list of dimension 2.");
 	    	return NULL;
 	    }
 	    // We have a vector q, get the q and phi values at which
 	    // to evaluate I(q,phi)
-	    q_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    phi_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,1));
+	    q_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
+	    phi_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
 	    // Skip zero
 	    if (q_value==0) {
@@ -157,5 +157,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		q_value = CCoreShellModel_readDouble(pars);		
+		q_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),q_value));
@@ -168,5 +168,5 @@
  * @return: function value
  */
-static PyObject * runXY(CCoreShellModel *self, PyObject *args) {
+static PyObject * runXY([PYTHONCLASS] *self, PyObject *args) {
 	double qx_value, qy_value;
 	PyObject* pars;
@@ -187,6 +187,6 @@
 	// Get input and determine whether we have to supply a 1D or 2D return value.
 	if ( !PyArg_ParseTuple(args,"O",&pars) ) {
-	    PyErr_SetString(CCoreShellModelError, 
-	    	"CCoreShellModel.run expects a q value.");
+	    PyErr_SetString([PYTHONCLASS]Error, 
+	    	"[PYTHONCLASS].run expects a q value.");
 		return NULL;
 	}
@@ -198,12 +198,12 @@
 	    npars = PyList_GET_SIZE(pars); 
 	    if(npars!=2) {
-	    	PyErr_SetString(CCoreShellModelError, 
-	    		"CCoreShellModel.run expects a double or a list of dimension 2.");
+	    	PyErr_SetString([PYTHONCLASS]Error, 
+	    		"[PYTHONCLASS].run expects a double or a list of dimension 2.");
 	    	return NULL;
 	    }
 	    // We have a vector q, get the qx and qy values at which
 	    // to evaluate I(qx,qy)
-	    qx_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,0));
-	    qy_value = CCoreShellModel_readDouble(PyList_GET_ITEM(pars,1));
+	    qx_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,0));
+	    qy_value = [PYTHONCLASS]_readDouble(PyList_GET_ITEM(pars,1));
 		return Py_BuildValue("d",core_shell_analytical_2DXY(&(self->model_pars),qx_value,qy_value));
 
@@ -211,5 +211,5 @@
 
 		// We have a scalar q, we will evaluate I(q)
-		qx_value = CCoreShellModel_readDouble(pars);		
+		qx_value = [PYTHONCLASS]_readDouble(pars);		
 		
 		return Py_BuildValue("d",core_shell_analytical_1D(&(self->model_pars),qx_value));
@@ -217,5 +217,5 @@
 }
 
-static PyObject * reset(CCoreShellModel *self, PyObject *args) {
+static PyObject * reset([PYTHONCLASS] *self, PyObject *args) {
     
 
@@ -224,5 +224,5 @@
 
 
-static PyMethodDef CCoreShellModel_methods[] = {
+static PyMethodDef [PYTHONCLASS]_methods[] = {
     {"run",      (PyCFunction)run     , METH_VARARGS,
       "Evaluate the model at a given Q or Q, phi"},
@@ -236,11 +236,11 @@
 };
 
-static PyTypeObject CCoreShellModelType = {
+static PyTypeObject [PYTHONCLASS]Type = {
     PyObject_HEAD_INIT(NULL)
     0,                         /*ob_size*/
-    "CCoreShellModel",             /*tp_name*/
-    sizeof(CCoreShellModel),             /*tp_basicsize*/
+    "[PYTHONCLASS]",             /*tp_name*/
+    sizeof([PYTHONCLASS]),             /*tp_basicsize*/
     0,                         /*tp_itemsize*/
-    (destructor)CCoreShellModel_dealloc, /*tp_dealloc*/
+    (destructor)[PYTHONCLASS]_dealloc, /*tp_dealloc*/
     0,                         /*tp_print*/
     0,                         /*tp_getattr*/
@@ -258,5 +258,5 @@
     0,                         /*tp_as_buffer*/
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
-    "CCoreShellModel objects",           /* tp_doc */
+    "[PYTHONCLASS] objects",           /* tp_doc */
     0,		               /* tp_traverse */
     0,		               /* tp_clear */
@@ -265,6 +265,6 @@
     0,		               /* tp_iter */
     0,		               /* tp_iternext */
-    CCoreShellModel_methods,             /* tp_methods */
-    CCoreShellModel_members,             /* tp_members */
+    [PYTHONCLASS]_methods,             /* tp_methods */
+    [PYTHONCLASS]_members,             /* tp_members */
     0,                         /* tp_getset */
     0,                         /* tp_base */
@@ -273,7 +273,7 @@
     0,                         /* tp_descr_set */
     0,                         /* tp_dictoffset */
-    (initproc)CCoreShellModel_init,      /* tp_init */
+    (initproc)[PYTHONCLASS]_init,      /* tp_init */
     0,                         /* tp_alloc */
-    CCoreShellModel_new,                 /* tp_new */
+    [PYTHONCLASS]_new,                 /* tp_new */
 };
 
@@ -287,16 +287,16 @@
  * @param module: module to add the class to
  */ 
-void addCCoreShellModel(PyObject *module) {
+void add[PYTHONCLASS](PyObject *module) {
 	PyObject *d;
 	
-    if (PyType_Ready(&CCoreShellModelType) < 0)
+    if (PyType_Ready(&[PYTHONCLASS]Type) < 0)
         return;
 
-    Py_INCREF(&CCoreShellModelType);
-    PyModule_AddObject(module, "CCoreShellModel", (PyObject *)&CCoreShellModelType);
+    Py_INCREF(&[PYTHONCLASS]Type);
+    PyModule_AddObject(module, "[PYTHONCLASS]", (PyObject *)&[PYTHONCLASS]Type);
     
     d = PyModule_GetDict(module);
-    CCoreShellModelError = PyErr_NewException("CCoreShellModel.error", NULL, NULL);
-    PyDict_SetItemString(d, "CCoreShellModelError", CCoreShellModelError);
-}
-
+    [PYTHONCLASS]Error = PyErr_NewException("[PYTHONCLASS].error", NULL, NULL);
+    PyDict_SetItemString(d, "[PYTHONCLASS]Error", [PYTHONCLASS]Error);
+}
+
