Updated python framework code