从Python调用外部函数? ctypes的? [英] Calling foreign functions from Python? ctypes?

查看:61
本文介绍了从Python调用外部函数? ctypes的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要调用一些Windows API。是win32接口下载ctypes或

的唯一方法吗?有没有计划将ctypes电池变成标准的Python构建?

I need to call some Windows APIs. Is the only way to download ctypes or
the win32 interfaces? Is there any plan to get ctypes batteries into
the standard Python build?

推荐答案

Paul Watson写道:
Paul Watson wrote:
我需要调用一些Windows API。是下载ctypes或win32接口的唯一方法吗?


这取决于您要拨打的特定win32接口。

通常,答案是是。

有没有计划将ctypes电池纳入标准的Python构建?
I need to call some Windows APIs. Is the only way to download ctypes or
the win32 interfaces?
That depends on the specific win32 interface you want to call.
Typically, the answer is "yes".
Is there any plan to get ctypes batteries into the standard Python build?




我没有这样的计划。据我所知,ctypes也从来没有为Python做过贡献,因此它的作者显然没有计划,




问候,

Martin



I don''t have such a plan. To my knowledge, ctypes has never been
contributed to Python, either, so its author apparently has no plan,
either.

Regards,
Martin


Paul Watson:
Paul Watson:
有没有计划获得ctypes电池进入标准的Python构建?
Is there any plan to get ctypes batteries into
the standard Python build?




ctypes不太可能包含在标准的Python

build中允许不安全的内存访问使其更容易崩溃

Python。


Neil



It is unlikely that ctypes will be included in the standard Python
build as it allows unsafe memory access making it much easier to crash
Python.

Neil


" Martin v.L?wis <毫安**** @ v.loewis.de>写道:
"Martin v. L?wis" <ma****@v.loewis.de> writes:
据我所知,ctypes也从来没有贡献过Python,所以它的作者显然也没有计划。
To my knowledge, ctypes has never been contributed to Python,
either, so its author apparently has no plan, either.




Python.org有没有人问他或她?



Has anyone from Python.org asked him or her?


这篇关于从Python调用外部函数? ctypes的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆