Beispiel #1
0
  /* "G:/Projekte/svn_mynew/svnroot/os2/usb/k8055/pyk8055/pyk8055lib.pyx":84 */
  Py_INCREF(__pyx_v_strwrite);
  __pyx_r = __pyx_v_strwrite;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_5);
  __Pyx_AddTraceback("pyk8055lib.K8055LibClass.WriteasString");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_i);
  Py_DECREF(__pyx_v_strwrite);
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_writedata);
  return __pyx_r;
}

static PyObject *__pyx_tp_new_10pyk8055lib_K8055LibClass(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  if (__pyx_f_10pyk8055lib_13K8055LibClass___cinit__(o, a, k) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_10pyk8055lib_K8055LibClass(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++o->ob_refcnt;
    __pyx_f_10pyk8055lib_13K8055LibClass___dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --o->ob_refcnt;
    PyErr_Restore(etype, eval, etb);
  }
  (*o->ob_type->tp_free)(o);
}

static struct PyMethodDef __pyx_methods_10pyk8055lib_K8055LibClass[] = {
  {"ReadasString", (PyCFunction)__pyx_f_10pyk8055lib_13K8055LibClass_ReadasString, METH_VARARGS|METH_KEYWORDS, 0},
  {"ReadData", (PyCFunction)__pyx_f_10pyk8055lib_13K8055LibClass_ReadData, METH_VARARGS|METH_KEYWORDS, 0},
  {"WriteData", (PyCFunction)__pyx_f_10pyk8055lib_13K8055LibClass_WriteData, METH_VARARGS|METH_KEYWORDS, 0},
  {"WriteasString", (PyCFunction)__pyx_f_10pyk8055lib_13K8055LibClass_WriteasString, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_K8055LibClass = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_K8055LibClass = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_K8055LibClass = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_K8055LibClass = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_10pyk8055lib_K8055LibClass = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "pyk8055lib.K8055LibClass", /*tp_name*/
  sizeof(struct __pyx_obj_10pyk8055lib_K8055LibClass), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_10pyk8055lib_K8055LibClass, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_K8055LibClass, /*tp_as_number*/
  &__pyx_tp_as_sequence_K8055LibClass, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_K8055LibClass, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_K8055LibClass, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_10pyk8055lib_K8055LibClass, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_10pyk8055lib_13K8055LibClass___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_10pyk8055lib_K8055LibClass, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initpyk8055lib(void); /*proto*/
PyMODINIT_FUNC initpyk8055lib(void) {
  PyObject *__pyx_1 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("pyk8055lib", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  Py_INCREF(__pyx_m);
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyType_Ready(&__pyx_type_10pyk8055lib_K8055LibClass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "K8055LibClass", (PyObject *)&__pyx_type_10pyk8055lib_K8055LibClass) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; goto __pyx_L1;}
  __pyx_ptype_10pyk8055lib_K8055LibClass = &__pyx_type_10pyk8055lib_K8055LibClass;

  /* "G:/Projekte/svn_mynew/svnroot/os2/usb/k8055/pyk8055/pyk8055lib.pyx":1 */
  __pyx_1 = __Pyx_Import(__pyx_n_re, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_re, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "G:/Projekte/svn_mynew/svnroot/os2/usb/k8055/pyk8055/pyk8055lib.pyx":2 */
  __pyx_1 = __Pyx_Import(__pyx_n_struct, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_struct, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "G:/Projekte/svn_mynew/svnroot/os2/usb/k8055/pyk8055/pyk8055lib.pyx":73 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("pyk8055lib");
}
Beispiel #2
0
  /*else*/ {
    __pyx_2 = PyFloat_FromDouble(1.0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; goto __pyx_L1;}
    __pyx_r = __pyx_2;
    __pyx_2 = 0;
    goto __pyx_L0;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("Domain.CCS.utils.dactivation");
  __pyx_r = 0;
  __pyx_L0:;
  return __pyx_r;
}

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initutils(void); /*proto*/
PyMODINIT_FUNC initutils(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  __pyx_init_filenames();
  __pyx_m = Py_InitModule4("utils", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
  Py_INCREF(__pyx_m);
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;};

  /* "d:\Dropbox\Dropbox\devsimpy\Domain\CCS\utils.pyx":2 */
  __pyx_1 = PyList_New(1); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  Py_INCREF(__pyx_n_expit);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_expit);
  __pyx_2 = __Pyx_Import(__pyx_k2p, __pyx_1); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_expit); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_expit, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 2; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "d:\Dropbox\Dropbox\devsimpy\Domain\CCS\utils.pyx":7 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("Domain.CCS.utils");
}
Beispiel #3
0
    /* "/Users/kern/projects/redir/redir.pyx":66 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_stop); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    __pyx_7 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_v_output);
    __pyx_v_output = __pyx_7;
    __pyx_7 = 0;
    switch (__pyx_why) {
      case 3: goto __pyx_L0;
      case 4: {
        PyErr_Restore(__pyx_1, __pyx_2, __pyx_3);
        __pyx_lineno = __pyx_4;
        __pyx_1 = 0;
        __pyx_2 = 0;
        __pyx_3 = 0;
        goto __pyx_L1;
      }
    }
  }

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("redir.Redirector.test");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_xyzzy);
  Py_DECREF(__pyx_v_output);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_False, "False"},
  {&__pyx_n_True, "True"},
  {&__pyx_n_close, "close"},
  {&__pyx_n_fdopen, "fdopen"},
  {&__pyx_n_foo, "foo"},
  {&__pyx_n_os, "os"},
  {&__pyx_n_pipe, "pipe"},
  {&__pyx_n_r, "r"},
  {&__pyx_n_read, "read"},
  {&__pyx_n_start, "start"},
  {&__pyx_n_started, "started"},
  {&__pyx_n_stop, "stop"},
  {&__pyx_n_sys, "sys"},
  {&__pyx_n_xyzzy, "xyzzy"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k6p, __pyx_k6, sizeof(__pyx_k6)},
  {0, 0, 0}
};
static struct __pyx_vtabstruct_5redir_Redirector __pyx_vtable_5redir_Redirector;

static PyObject *__pyx_tp_new_5redir_Redirector(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (*t->tp_alloc)(t, 0);
  struct __pyx_obj_5redir_Redirector *p = (struct __pyx_obj_5redir_Redirector *)o;
  (struct __pyx_vtabstruct_5redir_Redirector *)p->__pyx_vtab = __pyx_vtabptr_5redir_Redirector;
  return o;
}

static void __pyx_tp_dealloc_5redir_Redirector(PyObject *o) {
  struct __pyx_obj_5redir_Redirector *p = (struct __pyx_obj_5redir_Redirector *)o;
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_5redir_Redirector(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_5redir_Redirector *p = (struct __pyx_obj_5redir_Redirector *)o;
  return 0;
}

static int __pyx_tp_clear_5redir_Redirector(PyObject *o) {
  struct __pyx_obj_5redir_Redirector *p = (struct __pyx_obj_5redir_Redirector *)o;
  return 0;
}

static struct PyMethodDef __pyx_methods_5redir_Redirector[] = {
  {"start", (PyCFunction)__pyx_f_5redir_10Redirector_start, METH_VARARGS|METH_KEYWORDS, 0},
  {"stop", (PyCFunction)__pyx_f_5redir_10Redirector_stop, METH_VARARGS|METH_KEYWORDS, 0},
  {"test", (PyCFunction)__pyx_f_5redir_10Redirector_test, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Redirector = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
};

static PySequenceMethods __pyx_tp_as_sequence_Redirector = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Redirector = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Redirector = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

statichere PyTypeObject __pyx_type_5redir_Redirector = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "redir.Redirector", /*tp_name*/
  sizeof(struct __pyx_obj_5redir_Redirector), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_5redir_Redirector, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_Redirector, /*tp_as_number*/
  &__pyx_tp_as_sequence_Redirector, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Redirector, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Redirector, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_5redir_Redirector, /*tp_traverse*/
  __pyx_tp_clear_5redir_Redirector, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_5redir_Redirector, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_f_5redir_10Redirector___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_5redir_Redirector, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

DL_EXPORT(void) initredir(void); /*proto*/
DL_EXPORT(void) initredir(void) {
  PyObject *__pyx_1 = 0;
  __pyx_m = Py_InitModule4("redir", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; goto __pyx_L1;};
  __pyx_vtabptr_5redir_Redirector = &__pyx_vtable_5redir_Redirector;
  __pyx_vtable_5redir_Redirector.flush = (void *)__pyx_f_5redir_10Redirector_flush;
  if (PyType_Ready(&__pyx_type_5redir_Redirector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  if (__Pyx_SetVtable(__pyx_type_5redir_Redirector.tp_dict, __pyx_vtabptr_5redir_Redirector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Redirector", (PyObject *)&__pyx_type_5redir_Redirector) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; goto __pyx_L1;}
  __pyx_ptype_5redir_Redirector = &__pyx_type_5redir_Redirector;

  /* "/Users/kern/projects/redir/redir.pyx":14 */
  __pyx_1 = __Pyx_Import(__pyx_n_sys, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_sys, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/kern/projects/redir/redir.pyx":15 */
  __pyx_1 = __Pyx_Import(__pyx_n_os, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_os, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/Users/kern/projects/redir/redir.pyx":20 */
  __pyx_v_5redir_STDOUT = 1;

  /* "/Users/kern/projects/redir/redir.pyx":21 */
  __pyx_v_5redir_STDERR = 2;

  /* "/Users/kern/projects/redir/redir.pyx":28 */
  __pyx_k3 = __pyx_v_5redir_STDOUT;

  /* "/Users/kern/projects/redir/redir.pyx":59 */
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  __Pyx_AddTraceback("redir");
}
Beispiel #4
0
    /* "/Users/kern/projects/redir/redir.pyx":57 */
    Py_INCREF(__pyx_v_output);
    __pyx_r = __pyx_v_output;
    goto __pyx_L0;
    goto __pyx_L2;
  }
  __pyx_L2:;

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("redir.Redirector.stop");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_f);
  Py_DECREF(__pyx_v_output);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_xyzzy;
static PyObject *__pyx_n_start;
static PyObject *__pyx_n_foo;
static PyObject *__pyx_n_stop;

static PyObject *__pyx_k6p;

static char (__pyx_k6[]) = "Bar!";

static PyObject *__pyx_f_5redir_10Redirector_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_5redir_10Redirector_test(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_xyzzy;
  PyObject *__pyx_v_output;
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  int __pyx_4;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_6 = 0;
  PyObject *__pyx_7 = 0;
  static char *__pyx_argnames[] = {0};
  if (!PyArg_ParseTupleAndKeywords(__pyx_args, __pyx_kwds, "", __pyx_argnames)) return 0;
  Py_INCREF(__pyx_v_self);
  __pyx_v_xyzzy = Py_None; Py_INCREF(__pyx_v_xyzzy);
  __pyx_v_output = Py_None; Py_INCREF(__pyx_v_output);

  /* "/Users/kern/projects/redir/redir.pyx":60 */
  __pyx_1 = __Pyx_Import(__pyx_n_xyzzy, 0); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 60; goto __pyx_L1;}
  Py_DECREF(__pyx_v_xyzzy);
  __pyx_v_xyzzy = __pyx_1;
  __pyx_1 = 0;

  /* "/Users/kern/projects/redir/redir.pyx":61 */
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_start); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_3); __pyx_3 = 0;

  /* "/Users/kern/projects/redir/redir.pyx":62 */
  /*try:*/ {

    /* "/Users/kern/projects/redir/redir.pyx":63 */
    __pyx_1 = PyObject_GetAttr(__pyx_v_xyzzy, __pyx_n_foo); if (!__pyx_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L3;}
    __pyx_2 = PyTuple_New(0); if (!__pyx_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L3;}
    __pyx_3 = PyObject_CallObject(__pyx_1, __pyx_2); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; goto __pyx_L3;}
    Py_DECREF(__pyx_1); __pyx_1 = 0;
    Py_DECREF(__pyx_2); __pyx_2 = 0;
    Py_DECREF(__pyx_3); __pyx_3 = 0;

    /* "/Users/kern/projects/redir/redir.pyx":64 */
    if (__Pyx_PrintItem(__pyx_k6p) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L3;}
    if (__Pyx_PrintNewline() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; goto __pyx_L3;}
  }
  /*finally:*/ {
    int __pyx_why;
    __pyx_why = 0; goto __pyx_L4;
    __pyx_L2: __pyx_why = 3; goto __pyx_L4;
    __pyx_L3: {
      __pyx_why = 4;
      Py_XDECREF(__pyx_1); __pyx_1 = 0;
      Py_XDECREF(__pyx_2); __pyx_2 = 0;
      Py_XDECREF(__pyx_3); __pyx_3 = 0;
      PyErr_Fetch(&__pyx_1, &__pyx_2, &__pyx_3);
      __pyx_4 = __pyx_lineno;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "/Users/kern/projects/redir/redir.pyx":66 */
    __pyx_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_stop); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    __pyx_6 = PyTuple_New(0); if (!__pyx_6) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    __pyx_7 = PyObject_CallObject(__pyx_5, __pyx_6); if (!__pyx_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; goto __pyx_L1;}
    Py_DECREF(__pyx_5); __pyx_5 = 0;
    Py_DECREF(__pyx_6); __pyx_6 = 0;
    Py_DECREF(__pyx_v_output);
    __pyx_v_output = __pyx_7;
    __pyx_7 = 0;
    switch (__pyx_why) {
      case 3: goto __pyx_L0;
      case 4: {
        PyErr_Restore(__pyx_1, __pyx_2, __pyx_3);
        __pyx_lineno = __pyx_4;
        __pyx_1 = 0;
        __pyx_2 = 0;
        __pyx_3 = 0;
        goto __pyx_L1;
      }
    }
  }

  __pyx_r = Py_None; Py_INCREF(__pyx_r);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_5);
  Py_XDECREF(__pyx_6);
  Py_XDECREF(__pyx_7);
  __Pyx_AddTraceback("redir.Redirector.test");
  __pyx_r = 0;
  __pyx_L0:;
  Py_DECREF(__pyx_v_xyzzy);
  Py_DECREF(__pyx_v_output);
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}
Beispiel #5
0
  /* "/home/sean/Projects/WorldMill/src/mill/workspace.pyx":49
 *             if not self._collections:
 *                 self._collections = self._read_collections()
 *             return self._collections             # <<<<<<<<<<<<<< 
 * 
 *     def __getitem__(self, name):
 */
  Py_INCREF(((struct __pyx_obj_4mill_9workspace_Workspace *)__pyx_v_self)->_collections);
  __pyx_r = ((struct __pyx_obj_4mill_9workspace_Workspace *)__pyx_v_self)->_collections;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_3);
  Py_XDECREF(__pyx_4);
  __Pyx_AddTraceback("mill.workspace.Workspace.collections.__get__");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_n_collections;

static PyObject *__pyx_pf_4mill_9workspace_9Workspace___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pf_4mill_9workspace_9Workspace___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  Py_INCREF(__pyx_v_self);
  Py_INCREF(__pyx_v_name);
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_collections); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n___getitem__); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  Py_INCREF(__pyx_v_name);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_name);
  __pyx_3 = PyObject_CallObject(__pyx_2, __pyx_1); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_r = __pyx_3;
  __pyx_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  Py_XDECREF(__pyx_3);
  __Pyx_AddTraceback("mill.workspace.Workspace.__getitem__");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  Py_DECREF(__pyx_v_name);
  return __pyx_r;
}

static PyObject *__pyx_pf_4mill_9workspace_9Workspace_keys(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4mill_9workspace_9Workspace_keys(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_collections); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_keys); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("mill.workspace.Workspace.keys");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_pf_4mill_9workspace_9Workspace_values(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4mill_9workspace_9Workspace_values(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_collections); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_values); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("mill.workspace.Workspace.values");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_pf_4mill_9workspace_9Workspace_items(PyObject *__pyx_v_self, PyObject *unused); /*proto*/
static PyObject *__pyx_pf_4mill_9workspace_9Workspace_items(PyObject *__pyx_v_self, PyObject *unused) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_self);
  __pyx_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_collections); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_items); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_CallObject(__pyx_2, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_r = __pyx_1;
  __pyx_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("mill.workspace.Workspace.items");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_self);
  return __pyx_r;
}

static PyObject *__pyx_pf_4mill_9workspace_workspace(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pf_4mill_9workspace_workspace(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r;
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  Py_INCREF(__pyx_v_path);
  __pyx_1 = PyTuple_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;}
  Py_INCREF(__pyx_v_path);
  PyTuple_SET_ITEM(__pyx_1, 0, __pyx_v_path);
  __pyx_2 = PyObject_CallObject(((PyObject*)__pyx_ptype_4mill_9workspace_Workspace), __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_r = __pyx_2;
  __pyx_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; Py_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("mill.workspace.workspace");
  __pyx_r = NULL;
  __pyx_L0:;
  Py_DECREF(__pyx_v_path);
  return __pyx_r;
}

static __Pyx_InternTabEntry __pyx_intern_tab[] = {
  {&__pyx_n_Collection, "Collection"},
  {&__pyx_n___getitem__, "__getitem__"},
  {&__pyx_n___init__, "__init__"},
  {&__pyx_n__read_collections, "_read_collections"},
  {&__pyx_n_collections, "collections"},
  {&__pyx_n_items, "items"},
  {&__pyx_n_keys, "keys"},
  {&__pyx_n_mill, "mill"},
  {&__pyx_n_ogrinit, "ogrinit"},
  {&__pyx_n_range, "range"},
  {&__pyx_n_values, "values"},
  {0, 0}
};

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_k3p, __pyx_k3, sizeof(__pyx_k3), 0},
  {0, 0, 0, 0}
};

static PyObject *__pyx_tp_new_4mill_9workspace_Workspace(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_4mill_9workspace_Workspace *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_4mill_9workspace_Workspace *)o);
  p->path = Py_None; Py_INCREF(Py_None);
  p->_collections = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_4mill_9workspace_Workspace(PyObject *o) {
  struct __pyx_obj_4mill_9workspace_Workspace *p = (struct __pyx_obj_4mill_9workspace_Workspace *)o;
  Py_XDECREF(p->path);
  Py_XDECREF(p->_collections);
  (*o->ob_type->tp_free)(o);
}

static int __pyx_tp_traverse_4mill_9workspace_Workspace(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_4mill_9workspace_Workspace *p = (struct __pyx_obj_4mill_9workspace_Workspace *)o;
  if (p->path) {
    e = (*v)(p->path, a); if (e) return e;
  }
  if (p->_collections) {
    e = (*v)(p->_collections, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_4mill_9workspace_Workspace(PyObject *o) {
  struct __pyx_obj_4mill_9workspace_Workspace *p = (struct __pyx_obj_4mill_9workspace_Workspace *)o;
  Py_XDECREF(p->path);
  p->path = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(p->_collections);
  p->_collections = Py_None; Py_INCREF(Py_None);
  return 0;
}
static PyObject *__pyx_sq_item_4mill_9workspace_Workspace(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = o->ob_type->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static PyObject *__pyx_getprop_4mill_9workspace_9Workspace_collections(PyObject *o, void *x) {
  return __pyx_pf_4mill_9workspace_9Workspace_11collections___get__(o);
}

static struct PyMethodDef __pyx_methods_4mill_9workspace_Workspace[] = {
  {"_read_collections", (PyCFunction)__pyx_pf_4mill_9workspace_9Workspace__read_collections, METH_NOARGS, 0},
  {"__getitem__", (PyCFunction)__pyx_pf_4mill_9workspace_9Workspace___getitem__, METH_O|METH_COEXIST, 0},
  {"keys", (PyCFunction)__pyx_pf_4mill_9workspace_9Workspace_keys, METH_NOARGS, 0},
  {"values", (PyCFunction)__pyx_pf_4mill_9workspace_9Workspace_values, METH_NOARGS, 0},
  {"items", (PyCFunction)__pyx_pf_4mill_9workspace_9Workspace_items, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyMemberDef __pyx_members_4mill_9workspace_Workspace[] = {
  {"path", T_OBJECT, offsetof(struct __pyx_obj_4mill_9workspace_Workspace, path), 0, 0},
  {0, 0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_4mill_9workspace_Workspace[] = {
  {"collections", __pyx_getprop_4mill_9workspace_9Workspace_collections, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Workspace = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  0, /*nb_divide*/
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  0, /*nb_coerce*/
  0, /*nb_int*/
  0, /*nb_long*/
  0, /*nb_float*/
  0, /*nb_oct*/
  0, /*nb_hex*/
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  0, /*nb_inplace_divide*/
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Workspace = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_4mill_9workspace_Workspace, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Workspace = {
  0, /*mp_length*/
  __pyx_pf_4mill_9workspace_9Workspace___getitem__, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Workspace = {
  0, /*bf_getreadbuffer*/
  0, /*bf_getwritebuffer*/
  0, /*bf_getsegcount*/
  0, /*bf_getcharbuffer*/
};

PyTypeObject __pyx_type_4mill_9workspace_Workspace = {
  PyObject_HEAD_INIT(0)
  0, /*ob_size*/
  "mill.workspace.Workspace", /*tp_name*/
  sizeof(struct __pyx_obj_4mill_9workspace_Workspace), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_4mill_9workspace_Workspace, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  0, /*tp_compare*/
  0, /*tp_repr*/
  &__pyx_tp_as_number_Workspace, /*tp_as_number*/
  &__pyx_tp_as_sequence_Workspace, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Workspace, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Workspace, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_4mill_9workspace_Workspace, /*tp_traverse*/
  __pyx_tp_clear_4mill_9workspace_Workspace, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_4mill_9workspace_Workspace, /*tp_methods*/
  __pyx_members_4mill_9workspace_Workspace, /*tp_members*/
  __pyx_getsets_4mill_9workspace_Workspace, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_4mill_9workspace_9Workspace___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_4mill_9workspace_Workspace, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
};

static struct PyMethodDef __pyx_methods[] = {
  {"workspace", (PyCFunction)__pyx_pf_4mill_9workspace_workspace, METH_O, 0},
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

PyMODINIT_FUNC initworkspace(void); /*proto*/
PyMODINIT_FUNC initworkspace(void) {
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  /*--- Libary function declarations ---*/
  __pyx_init_filenames();
  /*--- Module creation code ---*/
  __pyx_m = Py_InitModule4("workspace", __pyx_methods, 0, 0, PYTHON_API_VERSION);
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  __pyx_b = PyImport_AddModule("__builtin__");
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  /*--- Intern code ---*/
  if (__Pyx_InternStrings(__pyx_intern_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  /*--- String init code ---*/
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  /*--- Builtin init code ---*/
  __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; goto __pyx_L1;}
  /*--- Global init code ---*/
  /*--- Function export code ---*/
  /*--- Function import code ---*/
  /*--- Type init code ---*/
  __pyx_type_4mill_9workspace_Workspace.tp_free = _PyObject_GC_Del;
  if (PyType_Ready(&__pyx_type_4mill_9workspace_Workspace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
  if (PyObject_SetAttrString(__pyx_m, "Workspace", (PyObject *)&__pyx_type_4mill_9workspace_Workspace) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; goto __pyx_L1;}
  __pyx_ptype_4mill_9workspace_Workspace = &__pyx_type_4mill_9workspace_Workspace;
  /*--- Type import code ---*/
  /*--- Execution code ---*/

  /* "/home/sean/Projects/WorldMill/src/mill/workspace.pyx":7
 * cimport ograpi
 * 
 * from mill import ogrinit             # <<<<<<<<<<<<<< 
 * from mill.collection import Collection
 * 
 */
  __pyx_1 = PyList_New(1); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
  Py_INCREF(__pyx_n_ogrinit);
  PyList_SET_ITEM(__pyx_1, 0, __pyx_n_ogrinit);
  __pyx_2 = __Pyx_Import(__pyx_n_mill, __pyx_1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  __pyx_1 = PyObject_GetAttr(__pyx_2, __pyx_n_ogrinit); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_ogrinit, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; goto __pyx_L1;}
  Py_DECREF(__pyx_1); __pyx_1 = 0;
  Py_DECREF(__pyx_2); __pyx_2 = 0;

  /* "/home/sean/Projects/WorldMill/src/mill/workspace.pyx":8
 * 
 * from mill import ogrinit
 * from mill.collection import Collection             # <<<<<<<<<<<<<< 
 * 
 * 
 */
  __pyx_2 = PyList_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
  Py_INCREF(__pyx_n_Collection);
  PyList_SET_ITEM(__pyx_2, 0, __pyx_n_Collection);
  __pyx_1 = __Pyx_Import(__pyx_k3p, __pyx_2); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_n_Collection); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
  if (PyObject_SetAttr(__pyx_m, __pyx_n_Collection, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; goto __pyx_L1;}
  Py_DECREF(__pyx_2); __pyx_2 = 0;
  Py_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/home/sean/Projects/WorldMill/src/mill/workspace.pyx":64
 * 
 * 
 * def workspace(path):             # <<<<<<<<<<<<<< 
 *     return Workspace(path)
 * 
 */
  if (__Pyx_RegisterCleanup()) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; goto __pyx_L1;};
  return;
  __pyx_L1:;
  Py_XDECREF(__pyx_1);
  Py_XDECREF(__pyx_2);
  __Pyx_AddTraceback("mill.workspace");
}
/* Implementation of setup */
static char __pyx_k_4[] = "create_deformation.py";
static char __pyx_k_7[] = "cython_code.pyx";
static char __pyx_k___main__[] = "__main__";
static PyObject *__pyx_kp___main__;
static char __pyx_k_1[] = "distutils.core";
static PyObject *__pyx_kp_1;
static char __pyx_k_setup[] = "setup";
static PyObject *__pyx_kp_setup;
static char __pyx_k_2[] = "distutils.extension";
static PyObject *__pyx_kp_2;
static char __pyx_k_Extension[] = "Extension";
static PyObject *__pyx_kp_Extension;
static char __pyx_k_3[] = "Cython.Distutils";
static PyObject *__pyx_kp_3;
static char __pyx_k_build_ext[] = "build_ext";
static PyObject *__pyx_kp_build_ext;
static char __pyx_k_numpy[] = "numpy";
static PyObject *__pyx_kp_numpy;
static char __pyx_k_scripts[] = "scripts";
static PyObject *__pyx_kp_scripts;
static char __pyx_k_cmdclass[] = "cmdclass";
static PyObject *__pyx_kp_cmdclass;
static char __pyx_k_5[] = "build_ext";
static PyObject *__pyx_kp_5;
static char __pyx_k_ext_modules[] = "ext_modules";
static PyObject *__pyx_kp_ext_modules;
static char __pyx_k_6[] = "cython_code";
static PyObject *__pyx_kp_6;
static char __pyx_k_include_dirs[] = "include_dirs";
static PyObject *__pyx_kp_include_dirs;
static char __pyx_k_get_include[] = "get_include";
static PyObject *__pyx_kp_get_include;
static PyObject *__pyx_kp_4;
static PyObject *__pyx_kp_7;

static struct PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static void __pyx_init_filenames(void); /*proto*/

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("setup"),
    0, /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp___main__, __pyx_k___main__, sizeof(__pyx_k___main__), 1, 1, 1},
  {&__pyx_kp_1, __pyx_k_1, sizeof(__pyx_k_1), 1, 1, 1},
  {&__pyx_kp_setup, __pyx_k_setup, sizeof(__pyx_k_setup), 1, 1, 1},
  {&__pyx_kp_2, __pyx_k_2, sizeof(__pyx_k_2), 1, 1, 1},
  {&__pyx_kp_Extension, __pyx_k_Extension, sizeof(__pyx_k_Extension), 1, 1, 1},
  {&__pyx_kp_3, __pyx_k_3, sizeof(__pyx_k_3), 1, 1, 1},
  {&__pyx_kp_build_ext, __pyx_k_build_ext, sizeof(__pyx_k_build_ext), 1, 1, 1},
  {&__pyx_kp_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 1, 1, 1},
  {&__pyx_kp_scripts, __pyx_k_scripts, sizeof(__pyx_k_scripts), 1, 1, 1},
  {&__pyx_kp_cmdclass, __pyx_k_cmdclass, sizeof(__pyx_k_cmdclass), 1, 1, 1},
  {&__pyx_kp_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 1, 0},
  {&__pyx_kp_ext_modules, __pyx_k_ext_modules, sizeof(__pyx_k_ext_modules), 1, 1, 1},
  {&__pyx_kp_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 1, 0},
  {&__pyx_kp_include_dirs, __pyx_k_include_dirs, sizeof(__pyx_k_include_dirs), 1, 1, 1},
  {&__pyx_kp_get_include, __pyx_k_get_include, sizeof(__pyx_k_get_include), 1, 1, 1},
  {&__pyx_kp_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 0},
  {&__pyx_kp_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 0},
  {0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  return 0;
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initsetup(void); /*proto*/
PyMODINIT_FUNC initsetup(void)
#else
PyMODINIT_FUNC PyInit_setup(void); /*proto*/
PyMODINIT_FUNC PyInit_setup(void)
#endif
{
  PyObject *__pyx_1 = 0;
  PyObject *__pyx_2 = 0;
  PyObject *__pyx_3 = 0;
  PyObject *__pyx_4 = 0;
  PyObject *__pyx_5 = 0;
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  #ifdef CYTHON_REFNANNY
  void* __pyx_refchk = NULL;
  __Pyx_Refnanny = __Pyx_ImportRefcountAPI("refnanny");
  if (!__Pyx_Refnanny) {
      PyErr_Clear();
      __Pyx_Refnanny = __Pyx_ImportRefcountAPI("Cython.Runtime.refnanny");
      if (!__Pyx_Refnanny)
          Py_FatalError("failed to import refnanny module");
  }
  __pyx_refchk = __Pyx_Refnanny->NewContext("PyMODINIT_FUNC PyInit_setup(void)", __LINE__, __FILE__);
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Library function declarations ---*/
  __pyx_init_filenames();
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("setup"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__pyx_module_is_main_setup) {
    if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_kp___main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_skip_dispatch = 0;
  /*--- Global init code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  /*--- Type import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":3
 * #!/usr/bin/env python
 * 
 * from distutils.core import setup             # <<<<<<<<<<<<<<
 * from distutils.extension import Extension
 * from Cython.Distutils import build_ext
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_setup);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_setup);
  __Pyx_GIVEREF(__pyx_kp_setup);
  __pyx_1 = __Pyx_Import(__pyx_kp_1, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_setup); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_setup, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 3; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":4
 * 
 * from distutils.core import setup
 * from distutils.extension import Extension             # <<<<<<<<<<<<<<
 * from Cython.Distutils import build_ext
 * import numpy
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_Extension);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_Extension);
  __Pyx_GIVEREF(__pyx_kp_Extension);
  __pyx_1 = __Pyx_Import(__pyx_kp_2, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_Extension); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_Extension, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 4; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":5
 * from distutils.core import setup
 * from distutils.extension import Extension
 * from Cython.Distutils import build_ext             # <<<<<<<<<<<<<<
 * import numpy
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_build_ext);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_build_ext);
  __Pyx_GIVEREF(__pyx_kp_build_ext);
  __pyx_1 = __Pyx_Import(__pyx_kp_3, ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_2 = PyObject_GetAttr(__pyx_1, __pyx_kp_build_ext); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_build_ext, __pyx_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":6
 * from distutils.extension import Extension
 * from Cython.Distutils import build_ext
 * import numpy             # <<<<<<<<<<<<<<
 * 
 * setup(
 */
  __pyx_1 = __Pyx_Import(__pyx_kp_numpy, 0); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_kp_numpy, __pyx_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_1); __pyx_1 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":8
 * import numpy
 * 
 * setup(             # <<<<<<<<<<<<<<
 *     scripts=["create_deformation.py"],
 *     cmdclass = {'build_ext': build_ext},
 */
  __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_setup); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_2);
  __pyx_1 = PyDict_New(); if (unlikely(!__pyx_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_1));

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":9
 * 
 * setup(
 *     scripts=["create_deformation.py"],             # <<<<<<<<<<<<<<
 *     cmdclass = {'build_ext': build_ext},
 *     ext_modules = [Extension("cython_code", ["cython_code.pyx"],
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_4);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_4);
  __Pyx_GIVEREF(__pyx_kp_4);
  if (PyDict_SetItem(__pyx_1, __pyx_kp_scripts, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":10
 * setup(
 *     scripts=["create_deformation.py"],
 *     cmdclass = {'build_ext': build_ext},             # <<<<<<<<<<<<<<
 *     ext_modules = [Extension("cython_code", ["cython_code.pyx"],
 *                    include_dirs = [numpy.get_include()])]
 */
  __pyx_3 = PyDict_New(); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_3));
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_build_ext); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_4);
  if (PyDict_SetItem(__pyx_3, __pyx_kp_5, __pyx_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_4); __pyx_4 = 0;
  if (PyDict_SetItem(__pyx_1, __pyx_kp_cmdclass, ((PyObject *)__pyx_3)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":11
 *     scripts=["create_deformation.py"],
 *     cmdclass = {'build_ext': build_ext},
 *     ext_modules = [Extension("cython_code", ["cython_code.pyx"],             # <<<<<<<<<<<<<<
 *                    include_dirs = [numpy.get_include()])]
 * )
 */
  __pyx_4 = __Pyx_GetName(__pyx_m, __pyx_kp_Extension); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_4);
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_kp_7);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_7);
  __Pyx_GIVEREF(__pyx_kp_7);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_kp_6);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_6);
  __Pyx_GIVEREF(__pyx_kp_6);
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __pyx_t_1 = 0;
  __pyx_3 = PyDict_New(); if (unlikely(!__pyx_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_3));

  /* "/micehome/matthijs/bazaar/assess-registration/scripts/setup.py":12
 *     cmdclass = {'build_ext': build_ext},
 *     ext_modules = [Extension("cython_code", ["cython_code.pyx"],
 *                    include_dirs = [numpy.get_include()])]             # <<<<<<<<<<<<<<
 * )
 */
  __pyx_5 = __Pyx_GetName(__pyx_m, __pyx_kp_numpy); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_5);
  __pyx_t_1 = PyObject_GetAttr(__pyx_5, __pyx_kp_get_include); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_5); __pyx_5 = 0;
  __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  if (PyDict_SetItem(__pyx_3, __pyx_kp_include_dirs, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_4, ((PyObject *)__pyx_t_2), ((PyObject *)__pyx_3)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_4); __pyx_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_3)); __pyx_3 = 0;
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_1, __pyx_kp_ext_modules, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_t_2 = PyEval_CallObjectWithKeywords(__pyx_2, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_2); __pyx_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_1)); __pyx_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_1);
  __Pyx_XDECREF(__pyx_2);
  __Pyx_XDECREF(__pyx_3);
  __Pyx_XDECREF(__pyx_4);
  __Pyx_XDECREF(__pyx_5);
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("setup");
  Py_DECREF(__pyx_m); __pyx_m = 0;
  __pyx_L0:;
  __Pyx_FinishRefcountContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}