Passing file-like objects to ctypes callbacks
问题 I'm attempting to use the LibVLC Python bindings to play an in-memory stream (Python 3.4, Windows 7, LibVLC 3.x). Eventually, my aim is to feed data into a BytesIO instance which VLC will then read from and play. But for the moment, I decided to hack up a quick script to try reading from a file stream. Here's the code and traceback - to say I'm pretty new to ctypes would be an understatement so does anyone know what I'm doing wrong? import ctypes import io import sys import time import vlc