Python utilities