On Tue, Aug 5, 2008 at 2:30 AM, castironpi <[EMAIL PROTECTED]> wrote: > I'm looking for a one-to-one function from strings to the built-in > data types in C. I will be keeping the string in a file. I need the > PyTypeObject* back from it. If nothing else I'll just do a bunch of > strcmp( "tuple" ) { return &PyTuple_Type; } commands, provided > &PyTuple_Type; will be linking the right address.
Something along the lines of this? b = PyImport_Import("__builtin__"); return PyObject_GetAttrString(b, typestring); -Miles -- http://mail.python.org/mailman/listinfo/python-list