The Pythoning

Scrapbooking useful Python programming ephemera and:

"Eating way more food than necessary at a meal, with the intent of stocking up so not to have to eat again for a long time." (from Urban Dictionary).

Jan 29

set TraitsUI (PyFace) backend to Qt4

In a Python script:

import os

os.environ['ETS_TOOLKIT'] = 'qt4'
# Must be prior to any traits imports

In a shell script:

#!/bin/sh

export ETS_TOOLKIT="qt4"

(Also an attempt to quote source code in Tumblr a la this post)