Merge python common: Abstract UI stuff; port blocking workarounds

(not ready)