Archive for category python
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 […]
Thialfi: because I haven’t already got enough to work on!
Posted by abingham in programming, python, Uncategorized on 2011/02/13
I’ve recently started making some progress on a project that I’ve wanted to do for a while now. The project, Thialfi *, fills the vacancy left in my life…indeed, in my heart…when “I Want Sandy” went offline. Sandy was something of an online digital assistant, and it (she?) probably had lots of features I never […]
An enum for Python
Posted by abingham in programming, python on 2011/02/04
The internet abounds with implementations of enumerations for Python, but I thought it might be fun to take a crack at making one. My goals were: Immutability: users shouldn’t be able to modify the value at runtime Simplicity of definition: They should be easy to define Uniqueness: Two enum values aren’t equal unless they are […]
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 […]
PitaTranslate…online
Posted by abingham in programming, python on 2010/03/22
First, I know it’s been quiet around here. Sorry about that. I have no excuse but laziness, so I can’t promise anything better in the future. Edit: …Ugh…Somehow wordpress didn’t notice the three or four other paragraphs I originally wrote for this post. You’ll have to take my word that it was moving prose indeed. So, […]
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++.
New Project: sxs
Posted by abingham in programming, python on 2009/09/19
I started a new project today called sxs (short for “side-by-side”). It’s another translation tool, this one designed to help me read things like newspaper articles. The basic premise is that it takes the source text, splits it into sentences, and then displays each sentence with its translation immediately below it. It’s largely functional now, […]
Simplifying branches with virtualenv
Posted by abingham in programming, python on 2009/08/31
In my last post I linked to a review of virtualenv, a tool for creating “isolated Python environments”. In a nutshell, virtualenv builds sandbox installations of Python to which you can “switch” in order to isolate yourself from other installations on your machine. Each sandbox has its own Python executables, libraries, and headers, so, for […]