python: make use of entry-by-path lookups