Weise-ipedia

Programming in Python

Calling C inside Python

  1. Create the C code, CODE.c, and the header, CODE.h, files
  2. Compile C code. This can be done two ways:
  3. Import ctypes in python: python from ctypes import *
  4. Import the C function from the shared object file: python C_FUNCTIONS = CDLL('./SHARED_OBJECT.so')
  5. Calling functions within python: python C_FUNCTIONS.functionName(arg1, arg2, ...)

Notes on Computers

AWS · Bash · C · C++ · Cyber Security · Git · LaTeX · Linux · Networking · Python · Raspberry Pi · Tools · Vim

Notes on Math & Physics

Information Theory · Linear Algebra · Solid State Physics


Copyright 2021 · Eric D. Weise