improve python parse utility