0

If i have a python code for the raspberry pi, will i be able to import C in it? because i have this cooking hacks shield.

Link: https://www.cooking-hacks.com/documentation/tutorials/raspberry-pi-to-arduino-shields-connection-bridge

The shield comes with: arduPi.cpp and arduPi.h files

How will i be able to call these files when i'm using python?

1

1 Answer 1

3

You can call C modules from Python (after all the reference Python implementation is written in C).

As to the question "will i be able to import C in it?", the answer must be no. If you had the needed level of knowledge you would have known the answer to the question.

I'd say you will need a fairly advanced knowledge of Python and some familiarity with C to achieve your aim.

The "simplest" method might be to use swig. There are swig packages in the standard reposotries (apt-cache search swig).

Not the answer you're looking for? Browse other questions tagged or ask your own question.