En Thu, 23 Aug 2007 03:42:52 -0300, <[EMAIL PROTECTED]> escribi�:
> On 22 kol, 21:18, [EMAIL PROTECTED] wrote: >> On 22 kol, 16:01, Gabriel Genellina <[EMAIL PROTECTED]> wrote: >> > > > >> > Can I cover or redirect log of that process into my wx >> program? >> > > > >> > I'am using Windows XP SP2, and Python 2.5. >> >> > Try the subprocess module. For the single line command you posted >> > earlier, you don't even need the bat file: >> >> > import subprocess >> > p = subprocess.Popen(["python", "myscript_setup.py", "py2exe"], >> > stdout=subprocess.PIPE, stderr=subprocess.STDOUT) >> > p.wait() >> > output_from_process = p.stdout.readlines() > This,works fine except this last line: > > output_from_process = p.stdout.readlines() > > I get an error: > > p has not attribute stdout It should! p should be an instance of subprocess.Popen - perhaps you reassigned some other thing to that name? (sorry for using a one-letter name, that's not a good idea, you should use a much better name instead, in order to avoid naming conflicts) -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list