Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
python在类中的dll回调函数中访问self
我有一些 api 的 dll 函数 如下所示 def dllcallback items pass 我想在与 dll 回调链接的类函数中访问 self class myobject object def init self self a 9
python
ctypes
如何将二维数组从Python传递到C?
我正在尝试使用 ctypes 将二维数组从 Python 传递到 C 数组数据类型为 uint16 我写了一个简单的代码只是为了理解它是如何工作的 C include
python
c
Arrays
pointers
ctypes
子类化 ctypes - Python
这是我在互联网上找到的一些代码 我不确定它是如何使用的 我简单填写了members使用枚举键 值并且它可以工作 但我很好奇这个元类是关于什么的 我假设它与 ctypes 有关 但我找不到关于子类化 ctypes 的太多信息 我知道 Enum
python
ctypes
如何使用 Ctypes 将这个 numpy 数组传递给 C?
目前我正在学习 C 类型 我的目标是生成一个 numpy python 中的数组 A 从 0 到 4 pi 需要 500 步 该数组被传递给 计算这些值的正切的 C 代码 C代码也 将这些值传递回 python 中的 numpy 数组 B
python
c
ctypes
尝试使用 ctypes 调用 wincred api
我正在尝试使用 ctypes API 读取 Windows 凭证库 但我不确定如何将函数结果转换回可用的 ctypes Structure import ctypes class CREDENTIALS ctypes Structure f
python
ctypes
advapi32
如何从 sip.voidptr (QImage.constBits()) 转换为 ctypes void 或 char 指针?
我使用的是 python 当然你不能很快地循环遍历大图像的每个像素 所以我遵循 C DLL 我想做这样的事情 img QImage myimage png constBits imgPtr c void p img found ctypes
python
python3x
QT
pyqt
ctypes
从 ctypes Windll 获取错误消息
我正在尝试使用 Python 脚本来更改 Windows 7 计算机上的壁纸 如果重要的话 我会从 node webkit 应用程序调用脚本 缩短的脚本如下所示 result ctypes windll user32 SystemParam
python
Windows
python27
ctypes
ctypes 上的指针以在 Python 3.1 上使用 OpenCV
我尝试通过 ctypes 在 Python 3 1 上使用 OpenCV 但我不知道如何表示指针 例如 如果我想加载图像并打印她的第一个像素的内容 我将用 C 编写 include
python
opencv
python3x
ctypes
python 中的 ctypes 与 memset 崩溃
我正在尝试从内存中删除密码字符串就像这里建议的那样 https stackoverflow com questions 982682 mark data as sensitive in python 983525 983525 我写了这个小
python
ctypes
ipython
如何使用 ctypes 接口从 C 返回包含 numpy 数组的对象?
抱歉 如果这很基本 我对 ctypes python 还很陌生 我的目标是调用一个 C 库 生成一个包含 动态分配的 数组的对象 然后将该对象返回给 python 并将其保存在 python 数据结构中 例如 一个包含numpy 整数数组
python
c
ctypes
如何将具有 0 值字节的 char * 转换为 python 字符串?
使用 ctypes 模块 我可以轻松地将 POINTER c char 或 c char p 类型导入到 python 中 但这两种方法都没有提供一种方法来最终得到包含零值字节的 python 字符串 c char p 以零终止 这意味着
python
ctypes
ctypes 与 _ctypes - 为什么后者存在?
我最近了解到Python不仅有一个名为ctypes 其中有一个文档页面 https docs python org library ctypes html 还有一个名为 ctypes which doesn t https docs pyt
python
ctypes
ctypes.pointer、ctypes.POINTER 和 ctypes.byref 之间有什么区别?
在ctypes中 指针和byref有什么区别 它们似乎都是将指针传递给函数的一种方式 例如作为输出参数 从功能上来说 它们是等效的 但是 那蟒蛇文档 http docs python org release 2 5 2 lib ctypes
python
ctypes
python ctype 递归结构
我用 C 语言为驱动程序开发了一个 DLL 我用 C 编写了一个测试程序 该 DLL 工作正常 现在我想使用 Python 与这个 DLL 进行交互 我已经成功隐藏了大部分用户定义的 C 结构 但有一点我必须使用 C 结构 我对 pytho
python
dll
recursion
Structure
ctypes
设置子进程中共享 c_char_p 中字符串的值?
我有这样的情况 主进程生成一些子进程 它们应该将结果写入字符串和数字类型的共享对象中 对于数字类型没有问题 但对于字符串 值将丢失 import multiprocessing as mp from ctypes import Struct
python
multiprocessing
ctypes
shared
CUDA 共享内存问题(以及将 CUDA 与 python/ctypes 一起使用)
不知怎的 当我修改时d updated water flow map在下面的代码中 d terrain height map也被修改 相反 更改两个数组的分配顺序可以解决问题 但我认为这只是掩盖了问题的根本原因 cudaCheck cuda
python
c
CUDA
ctypes
在 python 2.7 ctypes 中构建 UCS4 字符串缓冲区
在尝试重新创建getenvironment C 函数 winapi c 直接链接 https github com python cpython blob 202fda55c2dffe27125703225e5af92254602dc6 M
Windows
python27
Unicode
ctypes
Python ctypes:传递字符串数组
我在 Python 2 7 中有一个字符串数组 我想通过它传递给 C 函数ctypes unsigned int SetParams unsigned int count const char params 所以我可以在python中定义参
python
c
Arrays
string
ctypes
C++ 和 Python:从 python 向 c++ 传递并返回 2D 双指针数组
我想将一个 2D 数组从 Python 传递到 C 函数 然后将一个相同类型 相同维度的数组返回给 Python 我知道这个问题已经被问过好几次了 但我一直无法找到与我的问题相关的答案 对于我的问题 我必须使用双指针数组并让函数返回双指针数
python
c
multidimensionalarray
ctypes
SWIG
Python、ctypes.windll.user32.SystemParametersInfoA 中的参数是什么?
做什么的20 0 and 3Python 函数中的意思是 SPI SETDESKWALLPAPER 20 ctypes windll user32 SystemParametersInfoA SPI SETDESKWALLPAPER 0 i
python
Windows
function
parameters
ctypes
«
1
2
3
4
5
6
7
8
...10
»