Teste Flask via PHP

Executando comando:

cd /home/danielcr/marabo.danielcristensen.com.br/MaraboAccess && /home/danielcr/marabo.danielcristensen.com.br/MaraboAccess/venv/bin/python3 -c "import sys; sys.path.append('.'); from app import app; with app.test_client() as client:     r = client.get('/');     print(r.get_data().decode('utf-8'))" 2>&1

Resultado:

  File "<string>", line 1
    import sys; sys.path.append('.'); from app import app; with app.test_client() as client:     r = client.get('/');     print(r.get_data().decode('utf-8'))
                                                           ^
SyntaxError: invalid syntax