Fixed python syntax errors