我有一个C函数,它需要一个list \0结尾的字符串作为输入:
void external_C( int length , const char ** string_list) {
// Inspect the content of string_list - but not modify it.
}
在python (带有ctype)中,我想根据python字符串的列表调用此函数:
def call_c( string_list ):
lib.external_C( ?? )
call_c( ["String1" , "String2" , "The last string"])
关于如何在python端构建数据结构,有什么建议吗?注意,我保证C函数不会改变string_list中字符串的内容。
问候
joakim
https://stackoverflow.com/questions/3494598
复制相似问题