Search the Community
Showing results for tags 'syntax error'.
Hi, I try to use a python script what give stable solutions for the roommate problem. I have found this script: path to github. I get it to run from php with $output1 = exec(. /stableroomate.py ./solution_prefs.csv 2>&1", $output2) var_dump ($output1); But I get an error: string(27) "SyntaxError: invalid syntax" Array (  => File ".stableroomate.py", line 170  => holds = dict( (name, None) for name in prefs.keys() )  => ^  => SyntaxError: invalid syntax ) This refers to python (see attached stableroomate.py) # holds holds = dict( (name, None) for name in prefs.keys() ) What is wrong with this syntax? I tried to contact the author and the university where this came from, but there is little response. I am not familiar with python. Help here is greatly appreciated. README.md solution_prefs.csv stableroomate.py