Image for post
Image for post
A Google Trends comparison of version control search terms on September 13, 2020. See it now.

By the time I started my career, Git had already become the staple source control option in the software world. I worked with Git exclusively for nearly eight years before encountering a Subversion repo in the wild in my professional life.

Branching in Subversion isn’t as seamless as it is in Git. This isn’t a surprise given that svn is, in general, not as full-featured as Git. Subversion does support branching, however, and this article will walk you through the basics of creating and working on a branch using svn. …

The Python/C API: A Brief Introduction

Image for post
Image for post
CPython’s implementation of Py_Initialize in pylifecycle.c

The Python/C API brings together two of my two favorite things: Python and C.

What is it?

The Python/C API allows C programmers to embed Python directly into C code by exposing aspects of CPython internals. It provides direct access to the Python interpreter from C, acting as a bridge between the two languages.

An example

This C code calls Python’s platform.system().

On my system, this code prints out:

Platform name is Darwin


I built the code above on my Mac by running:

gcc -o example example.c -I<Python include directory> /opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib

I configured, built, and installed CPython on…

Ashley Wans

Software, parenting, and hula hoops.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store