Tag Archives: python

Diagnosing a Docker image build problem

My Python script for Global.health was not running in production, because it couldn’t find some imports. Now the real solution is to package up the imports with setuptools and install them at runtime (we manage the environments with poetry), but … Continue reading →

Posted in Code & Craft | Tagged | Leave a comment

Half a bee

When you’re writing Python tutorials, you have to use Monty Python references. It’s the law. On the 40th anniversary of the release of Monty Python’s Life of Brian, I wanted to share this example that I made for collections.defaultdict that … Continue reading →

Posted in Code & Craft | Tagged | Leave a comment

Pythonicity

The same community that says: There should be one– and preferably only one –obvious way to do it. Also says: So essentially when someone says something is unpythonic, they are saying that the code could be re-written in a way … Continue reading →

Posted in Code & Craft | Tagged | Leave a comment

Subconscious operation

I just noticed that I’ve been using Xcode’s codesense all day, despite the fact that I’m writing Python (albeit with PyObjC goodness).  I wasn’t aware that that would work, but then I wasn’t really aware that it was working, if … Continue reading →

Posted in Code & Craft | Tagged , | Leave a comment