Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
如何在python中将MPI信息传递给ctypes
我的动机是将 MPI 信息有效地从 python 传递到通过 ctypes 调用的 C 函数 我在 python 中使用 mpi4py 进行 MPI 绑定 我想通过一个用 C 编写并通过 python 中的 ctypes 调用的简单示例 M
python
MPI
ctypes
带有 numpy/ctypes 的环形缓冲区
我正在开发一个客户端 它将通过 TCP 接收 EEG 数据并将其写入环形缓冲区 我认为将缓冲区作为 ctypes 或 numpy 数组非常方便 因为可以为此类缓冲区的任何位置创建一个 numpy 视图 并读取 写入 处理数据 而无需任何复制
python
NumPy
ctypes
circularbuffer
将linux的.so文件转换为windows的.dll文件
我有一些 C 代码 具有各种头文件和 make 文件 编译为 soLinux Ubuntu 中的文件和python使用以下方式调用此共享对象的函数的程序Ctypes 现在 我想在 Windows 上使用这个程序 在窗户里 Ctypes需要一
c
dll
ctypes
Python:多处理和 c_char_p 数组
我正在启动 3 个进程 我希望它们将一个字符串放入共享数组中 在对应于过程 i 的索引处 看下面的代码 生成的输出是 test 0 None None test 1 test 1 None test 2 test 2 test 2 为什么
python
multiprocessing
ctypes
使用 PIL.Image 和 ctypes 进行像素操作
我有一个 C 函数 可以对 8 位 RGB 值的原始 2D 数组进行一些像素操作 我得到的答复是c ubyte大批 我的代码大致如下 from ctypes import cdll CDLL Structure byref c utype
python
pythonimaginglibrary
ctypes
将一组 NumPy 数组传递到 C 函数中进行输入和输出
假设我们有一个 C 函数 它接受一组一个或多个输入数组 处理它们 并将其输出写入一组输出数组 签名如下所示 count表示要处理的数组元素的数量 void compute int count float input float output
python
c
NumPy
ctypes
FFI
Python ctypes - 接受结构的 dll 函数崩溃
我必须在 ms windows xp 下访问 POS 终端 我正在使用Python 2 7 我加载的 DLL 中用于付款的关键函数接受两个指向结构的指针 但它崩溃并返回 1 通信错误 但没有进一步的消息 请注意 当调用支付函数时 并非 PO
python
pointers
ctypes
Structure
ctypes 指向 numpy 数组中间的指针
我知道如何获取指向 numpy 数组开头的 ctypes 指针 a np arange 10000 dtype np double p a ctypes data as POINTER c double p contents c doubl
python
pointers
NumPy
ctypes
如何使用 ctypes 在 Python 中模拟动态大小的 C 结构
我正在编写一些 python 代码来与广泛使用结构的 C DLL 进行交互 这些结构之一包含嵌套结构 我知道这对于 ctypes 模块来说不是问题 问题是 在 C 语言中 有一个经常使用的结构是通过宏定义的 因为它包含一个可以变化的 静态
python
c
ctypes
ctypes 段错误 仅适用于 OSX
我使用 ctypes 在 Python 中创建了一个非常简单的 C 库绑定 它所做的只是接受一个字符串并返回一个字符串 我在Ubuntu上进行了开发 一切看起来都很好 不幸的是 在 OSX 上完全相同的代码失败了 我完全被难住了 我整理了一
python
c
segmentationfault
ctypes
languagebinding
Python Ctypes 键盘事件
我有一些Python 2 7代码如下 import ctypes ctypes windll user32 keybd event 0xA5 0 0 0 Right Menu Key ctypes windll user32 keybd e
python
WINAPI
Keyboard
ctypes
pywin32
如何为Python打包的libcrypto和libssl启用FIPS模式?
我有一个 python 应用程序 它与 Python 和 Libcrypto 以及 LibSSL 共享对象一起打包 该应用程序是使用 Openssl Fips Module 2 0 构建的 这些共享对象由 Python 的 request
python
python3x
SSL
openssl
ctypes
Python ctypes 和动态链接
我正在用 C 编写一些库 其中包含我想通过 ctypes 从 Python 调用的函数 我已经在另一个库中成功完成了此操作 但是该库只有非常普通的依赖项 即fstream math malloc stdio stdlib 我正在开发的另一个
python
ctypes
dynamiclinking
Paradoxon:导入时 Python 的 ctypes.CDLL 会无声崩溃,但直接运行时不会崩溃 - 这怎么可能?
所以 作为一个 Linux 爱好者 我在 Windows 上偶然发现了一些我无法解释的非常令人费解的事情 我有一个类似于此示例的项目结构 D PROJECT tolkien py init py MiddleEarth gondor py
python
pythonimport
ctypes
Python ctypes 可以在 x86-64 上加载 32 位 C 库吗?
我有一台安装了 32 位库的 64 位 RHEL 主机 一个供应商有 32 位 所以我想使用 ctypes 加载到 Python 中 from ctypes import CDLL CDLL 32bitdinosaur so OSError
python
32bit64bit
ctypes
是什么导致这个安全描述符变坏?
我正在尝试使用此代码读取 Windows 中文件和目录的访问权限 模式为Tim Golden 提议对 os access 进行修补 使其能够从 Windows 上的 ACL 中读取 http bugs python org file9919
python
ctypes
pywin32
advapi32
如何使用 ctypes 读取多字节值
我想使用 ctypes 结构和联合从字节对象中读取两个连续的 24 位值 这将是 6 个字节 不幸的是 ctypes 读取每个值 32 位 还 sizeof报告结构比预期大 Using pack 1没有带来预期的结果 具有最小结构和二进制示
python
struct
ctypes
pthread 与 python VM 的回调
假设我有一个 python 脚本 它通过 ctypes 加载共享库 SL SL 设置了一个pthread T1 python 脚本通过 SL 配置回调 即 python 脚本通过引用 python 可调用项从 SL 调用函数 替代文本 ht
python
Linux
Multithreading
ctypes
pthreads
Python 和 ctypes:如何正确地将“指针到指针”传递到 DLL 中?
我有一个 DLL 它分配内存并返回它 DLL中的函数如下 void Foo unsigned char ppMem int pSize pSize 4 ppMem malloc pSize for int i 0 i lt pSize i
python
ctypes
使用 ctypes 将 python 字符串传递给 Fortran 子例程
我正在尝试使用 ctypes 将参数传递给共享库中的 Fortran 子例程 现在这是我的简单 fortran 代码 MODULE test module INCLUDES SUBROUTINE fstr test file or exte
python
Fortran
sharedlibraries
ctypes
«
1
2
3
4
5
6
...10
»