string to type object (C)

Terry Reedy tjreedy at udel.edu
Tue Aug 5 21:57:50 CEST 2008



castironpi wrote:
> Hello,
> 
> 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.

Use a dict mapping py strings to the object pointers (cast to py ints).




More information about the Python-list mailing list