From: <cne...@us...> - 2009-10-08 08:06:46
|
Revision: 44 http://cgos.svn.sourceforge.net/cgos/?rev=44&view=rev Author: cnentwich Date: 2009-10-08 08:06:36 +0000 (Thu, 08 Oct 2009) Log Message: ----------- committing argument parsing fix (need to find contributor's name) Modified Paths: -------------- trunk/client-python/readme.txt trunk/client-python/src/config.py trunk/client-python/src/gtpengine.py Modified: trunk/client-python/readme.txt =================================================================== --- trunk/client-python/readme.txt 2009-07-01 19:04:49 UTC (rev 43) +++ trunk/client-python/readme.txt 2009-10-08 08:06:36 UTC (rev 44) @@ -1,5 +1,5 @@ -------------------------------------------------------------------------- -Copyright (C) 2009 Christian Nentwich +Copyright (C) 2009 Christian Nentwich and contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ Refer to doc\index.html to get started. + doc\contributors.html lists the contributors. Modified: trunk/client-python/src/config.py =================================================================== --- trunk/client-python/src/config.py 2009-07-01 19:04:49 UTC (rev 43) +++ trunk/client-python/src/config.py 2009-10-08 08:06:36 UTC (rev 44) @@ -1,5 +1,5 @@ ''' -Copyright (C) 2009 Christian Nentwich +Copyright (C) 2009 Christian Nentwich and contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -82,7 +82,7 @@ currentSection = ConfigSection(line[0 : len(line) -1 ]) self._sections.append(currentSection) elif "=" in line and currentSection is not None: - param = line.split("=") + param = line.split("=", 1) currentSection.addValue(param[0].strip(), param[1].strip()) self._validate() Modified: trunk/client-python/src/gtpengine.py =================================================================== --- trunk/client-python/src/gtpengine.py 2009-07-01 19:04:49 UTC (rev 43) +++ trunk/client-python/src/gtpengine.py 2009-10-08 08:06:36 UTC (rev 44) @@ -1,5 +1,5 @@ ''' -Copyright (C) 2009 Christian Nentwich +Copyright (C) 2009 Christian Nentwich and contributors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -130,7 +130,11 @@ engine. ''' self.logger.info("Starting GTP engine, command line: " + self._programCommandLine) - self._subprocess = subprocess.Popen(self._programCommandLine, stdin=subprocess.PIPE, + if sys.platform == "win32": + args = self._programCommandLine + else: + args = self._programCommandLine.split() + self._subprocess = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, shell=False) time.sleep(1) self._findSupportedCommands(mandatoryCommands) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |