pyd generate tools
Project description
pyd_tpl
Python的C接口模板,安装后使用如下的命令进行生成:
pyd_tpl module_name=Animal --class-name=Cat
将生成Animal模块Cat类
changelog
- 2022-01-15
新增函数get_c_string
(将Python转换为char)和print
(打印PyObject*)
调用方法如下:
PyObject* a;
if (!PyArg_ParseTuple(args,"U",&a))
{
return NULL;
}
const char* s = get_c_string(a);
printf("%s\n", s);
print(a);
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyd_tpl-0.1.3.tar.gz
(4.6 kB
view hashes)
Built Distributions
pyd_tpl-0.1.3-py3-none-any.whl
(12.8 kB
view hashes)
pyd_tpl-0.1.3-py2-none-any.whl
(12.8 kB
view hashes)