python-cffi Questions

21

I have Python 2.6 in my Linux rhel-5. I have installed pip and required CFFI packages. When I try to run a sample CFFI program: ffi = FFI() it says: File "/usr/lib/python2.6/site-packages/cff...
Hyaluronidase asked 19/12, 2015 at 12:51

3

Solved

Im trying to run the below Dockerfile using docker-compose. I searched around but I couldnt find a solution on how to install cffi with python:3.9-alpine. I also read this post which states that pi...
Egesta asked 6/3, 2022 at 16:20

5

Using pip version 20.2.4, Python 3.8.2 and Big Sur 11.0.1. When I run pip install cryptography, I get this error: Building wheels for collected packages: cffi Building wheel for cffi (setup.py): ...
Impartial asked 19/11, 2020 at 20:17

5

Solved

I am developing an audio algorithm using Python and Numpy. Now I want to speed up that algorithm by implementing a part of it in C. In the past, I have done this using cython. Now I want to do the ...
Burmaburman asked 29/4, 2013 at 10:22

1

i am trying to convert my python code to dll using cffi so i can access this code in my c# apllication, and i am trying to send image my c# code to python function, below is my code to read the fil...
Ritualism asked 13/9, 2020 at 11:8

2

I run Python 3.3 (Anaconda distribution) under Windows 7, 64-bit. I have attempted to install the Weasyprint app/library, which has a number of dependencies, including CFFI, which I had to compile ...
Prot asked 24/11, 2013 at 11:38

0

While updating a tool to python3, I have been facing this issue on MacOS. print(args.secret) h = hmac.HMAC(args.secret.decode("hex"),hashes.SHA512(),backend=default_backend()) Output 39830c786a...

3

Solved

How do I install cairocffi through pip? cairocffi is a CFFI-based drop-in replacement for Pycairo https://github.com/SimonSapin/cairocffi. I'm trying to install it on Ubuntu 14.04: alvas@ubi:~$...
Preamplifier asked 13/4, 2015 at 0:54

1

Solved

This question follows this one. I use CFFI to create a DLL and I call it from a C++ application. I was questioning myself to find how to release memory allocated by the DLL and I follow the idea m...
Cartwheel asked 24/3, 2019 at 10:14

1

Solved

I'm using CFFI to generate a DLL: import cffi ffibuilder = cffi.FFI() ffibuilder.embedding_api(''' char* get_string(); ''') ffibuilder.set_source('my_plugin', '') ffibuilder.embedding_init_co...
Yalta asked 20/3, 2019 at 16:19

3

There is a way to initialize structure with dictionary: fooData= {'y': 1, 'x': 2} fooStruct = ffi.new("foo_t*", fooData) fooBuffer = ffi.buffer(fooStruct) Is there some ready function to do the ...
Ochlocracy asked 7/12, 2013 at 17:51

3

Solved

I'm working with python3, and i'm trying to install " cairocffi" on Ubuntu. To do this, i've successfully installed: python-dev libffi-dev cffi But when i've trying to install "cairocffi" with ...
Vshaped asked 11/1, 2016 at 10:37

0

I want to write Python software that uses CFFI. CFFI itself throws the error: distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Buil...
Chip asked 21/2, 2018 at 6:44

1

Using the CFFI library for Python, I'm trying to coax a Python string into a char*, so that I can pass it to a C function that accepts char*. I can't seem to figure out what the right incantation i...
Bulgaria asked 14/8, 2017 at 22:26

1

Solved

I'm trying to embed a Python function in C using PyPy and cffi. I'm following this guide from the PyPy documentation. The problem is, all the examples I've found operate on ints, and my function t...
Chasten asked 15/10, 2017 at 23:45

2

I want to create package for python that embeds and uses an external library (.so) on Linux using the cffi module. Is there standard way to include .so file into python package? The package will ...
Chiller asked 28/5, 2014 at 15:42

3

Solved

I am installing cffi package for cryptography and Jasmin installation. I did some research before posting question, so I found following option but which is seems not working: System Mac OSx 10.9....
Cannoneer asked 2/1, 2015 at 9:37

1

Solved

I have a C source/header file that are part of a bigger project. I would like to test this as a unit, independent of the real project. While it would be possible to do this in C by creating a new p...
Clubbable asked 21/6, 2016 at 5:11

1

I am trying to generate executable(x86) with pyinstaller(3.0) on windows7(x64). I have installed cffi and other needed packages with pip. I can import cffi and _cffi_backend module successfully fro...
Exclusive asked 4/12, 2015 at 0:3

1

Solved

It seems from the discussions issue #60 and issue #40 that PyPy couldn't build gmpy before. All I intend to use currently is the probable prime is_prime code which is conveniently in gmpy2. I get t...
Permeable asked 4/2, 2016 at 7:19

1

This question looks the same as this post, but since there was no answer, I am re-asking here. I have a Django project to be deployed on AWS Beanstalk, which is using a package cffi. When I run eb...
Matteo asked 5/7, 2015 at 13:40

1

Solved

I'm trying to use Python's CFFI to develop Python bindings to a scientific model written in C. The CFFI documentation is a little sparse and I'm stuck at the cdef stage. My process up to now has f...
Pellagra asked 3/8, 2015 at 19:36

1

Solved

I have been playing around with writing cffi modules in python, and their speed is making me wonder if I'm using standard python correctly. It's making me want to switch to C completely! Truthfully...
Marquettamarquette asked 14/4, 2014 at 9:4

2

Solved

Is there any project that bridges Python and Dalvik in same address space? That is an object created in one language can be registered as a listener in the other and vice versa? -- Python could ...
Zonnya asked 18/11, 2013 at 10:44

1

I am using CFFI to call a C function from Python that returns a struct. The struct is defined with a time_t element. How do I declare the struct to CFFI so that I can access it from Python? For ex...
Forewent asked 14/10, 2013 at 3:5

© 2022 - 2024 — McMap. All rights reserved.