diff -r fcd344deae84 -r 75fe73597273 wxPopen.py --- a/wxPopen.py Tue Oct 27 16:32:54 2009 +0100 +++ b/wxPopen.py Mon Nov 02 15:38:49 2009 +0100 @@ -69,16 +69,20 @@ class ProcessLogger: def __init__(self, logger, Command, finish_callback=None, no_stdout=False, no_stderr=False, no_gui=True): self.logger = logger - self.Command_str = Command - self.Command = [] - for i,word in enumerate(Command.replace("'",'"').split('"')): - if i % 2 == 0: - word = word.strip() - if len(word) > 0: - self.Command.extend(word.split()) - else: - self.Command.append(word) - + if not isinstance(Command, list): + self.Command_str = Command + self.Command = [] + for i,word in enumerate(Command.replace("'",'"').split('"')): + if i % 2 == 0: + word = word.strip() + if len(word) > 0: + self.Command.extend(word.split()) + else: + self.Command.append(word) + else: + self.Command = Command + self.Command_str = subprocess.list2cmdline(self.Command) + self.finish_callback = finish_callback self.no_stdout = no_stdout self.no_stderr = no_stderr @@ -95,6 +99,7 @@ "stdin":subprocess.PIPE, "stdout":subprocess.PIPE, "stderr":subprocess.PIPE} + if no_gui == True and wx.Platform == '__WXMSW__': self.startupinfo = subprocess.STARTUPINFO() self.startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW