Need help with extending python-lua library at labix.org

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Need help with extending python-lua library at labix.org

Vineet Jain
I'm using python and some c libraries for an application. Part of the
functionality was to allow users to write some python scripts and run
them on my servers. I'm currently using python for the user scripts but
am going to give that up since its too easy for some malicious script to
bring down my system. I started looking around at other options and
stumbled across lua. Putting python with lua I quickly came across the
lua-python library at:

http://labix.org/lunatic-python

I have Numeric arrays that I use extensively in my application. Can
those be accessed above using the above library? Here's the c type for
numeric arrays.

cdef extern from "Numeric/arrayobject.h":

   struct PyArray_Descr:
       int type_num, elsizeNeed help
       char type

   ctypedef class Numeric.ArrayType [object PyArrayObject]:
       cdef char *data
       cdef int nd
       cdef int *dimensions, *strides
       cdef object base
       cdef PyArray_Descr *descr
       cdef int flags
       cdef object weakreflist

I don't have visual dev installed on my laptop so have not been able to
try out the above library?

If the numeric array is not supported, how much effort would it be to
support it? Also, I saw someone post on the lua for adding hooks which
allow you to restrict how much memory and cpu time function calls take:
(using lua_getgccount) would the sandbox env work with your library?

I don't know python or lua internals and would need help extending this.
Is anyone on this list interested in extending the above library. I
would pay for the work.

Thanks,

VJ