python: massive adjustements