Skip to content

Instantly share code, notes, and snippets.

View kkleidal's full-sized avatar

Ken Leidal kkleidal

  • Genesis Therapeutics
  • Boston, MA
View GitHub Profile
@hensing
hensing / python_logging.c
Last active October 15, 2024 14:40
Python: Use 'logging' module from C extension
#include <Python.h>
/***********************************************************/
/* define logging function and logtypes for python.logging */
/* by H.Dickten 2014 */
/***********************************************************/
enum logtypes {info, warning, error, debug};
static void log_msg(int type, char *msg)
{