Skip to content

Instantly share code, notes, and snippets.

@autozimu
autozimu / ffilib.py
Last active August 29, 2015 14:04
Compile C to shared library and load it using ffi
#!/usr/bin/env python
"""
Quickly open an dylib connection. Helpful for testing and exploring.
"""
import os, sys
import glob2
# recursive glob, which is builtin function in python3
import subprocess
from cffi import FFI