Some Python utilities