Posts Tagged c++

Debugging C/C++ and CPython using GDB 7’s new Python extension support

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 […]

, ,

2 Comments

Try as you might…

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 […]

,

Leave a comment

New Project: ackward

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 […]

, , ,

Leave a comment

Boost.Python and Handling Python Exceptions

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++.

, , ,

2 Comments

Two methods for python method access from C++

Lately I’ve been exploring ways to improve the performance of some areas of code where embedded python calls are made from C++. A common and obvious (and often effective) approach for increasing performance in these areas is to forgo python and rewrite performance-critical areas in C/C++. However, I got curious about other, less invasive ideas, […]

, ,

Leave a comment