add missing final quotes to Python calls