Menu

#5 Python client: engine command with arguments fails on Unix

open
nobody
None
5
2011-03-05
2011-03-05
No

In cgos-client-python-0.3.0, starting a GTP engine fails on Unix if the command line for starting the engine has arguments. The reason is that on Unix, when calling Popen with shell=False, args should be a sequence not a string (see http://docs.python.org/library/subprocess.html#module-subprocess\). The bug can be fixed by importing module shlex and using shlex.split(self._programCommandLine) as the first argument to the Popen call in function connect() of class EngineConnector in gtpengine.py.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB