I'm not experienced with Python, but shoudln't you escape the values here to avoid issues with shell special chars ?