Archive for category c++
Debugging C/C++ and CPython using GDB 7′s new Python extension support
Posted by abingham in c++, programming, python on 2012/03/24
I’ve recently been looking into ways to improve my debugging experience with mixed Python and C/C++ programs. I spend a fair amount of time working on systems built using both languages in tandem, and the tools available for debugging across the languages have historically been very limited. Often, logging and/or intimate knowledge of the Python […]
Try as you might…
Posted by abingham in c++, programming on 2010/09/09
I came across a corner of C++ exception handling that I had never noticed before (yes, the title is a pun), and it was interesting enough that I thought I’d share. The issue revolves around the type of an exception after it has been re-thrown. There are two ways to re-throw an exception after it […]
New Project: ackward
Posted by abingham in c++, programming, python on 2010/08/17
I recently started a new project, ackward, which aims to provide a C++ interface to parts of the Python standard library. The library is aimed at embedded Python scenarios where the C++ program needs to interact on a deeper level with the Python structures and such. Of course, you can already accomplish this using the […]
APHW
Posted by abingham in c++, programming, python on 2009/12/31
I recently started looking at HamsterDB, a BerkeleyDB-like database system. In a nutshell, it provides simple, bare-bones key-value storage with ACID properties. It promises to be fast and small, and my initial (meager) experimentation seems to bear that out. Unlike Berkeley, it seems to choose simplicity in its API rather than providing every possible knob. […]
Boost.Python and Handling Python Exceptions
Posted by abingham in c++, programming, python on 2009/10/11
Handling Python exceptions from C++ code requires diligence
and consistent checking of error codes, and, really, who wants to deal
with that? A more natural system is
one in which Python exceptions are somehow converted to C++ exceptions
at the Python-C++ boundary, and where exception propagation continues
out of Python into C++.