Skip to main content

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)

Uploaded Source

Built Distributions

pyd_tpl-0.1.3-py3-none-any.whl (12.8 kB view hashes)

Uploaded Python 3

pyd_tpl-0.1.3-py2-none-any.whl (12.8 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page