python: advanced howto example