[python-win32] wexpect and running without a console

Olof Rutgersson Olof.Rutgersson at xelerated.com
Thu Jan 21 11:46:58 CET 2010


Seems reasonable to me, I don't believe there is an error in my code since it works perfectly running from console and this error occurs instantly when NOT running from console. There is no way when accessing Wexpect to instruct it that Python is running without a console, and there should be no need to either (IMHO). Wexpect doesn't seem to have that much of a development going on, so I guess it's up to me to fix it (or run it on Linux/cygwin and use Pexpect instead).

Thanks for the help!

//Olof Rutgersson
-----Original Message-----
From: Mark Hammond [mailto:skippy.hammond at gmail.com] 
Sent: den 20 januari 2010 23:22
To: Olof Rutgersson
Cc: python-win32 at python.org
Subject: Re: [python-win32] wexpect and running without a console

On 21/01/2010 1:57 AM, Olof Rutgersson wrote:

> The invalid handle error seems to be related to the fact that I'm not launching python.exe from a console but from another process, can it be related to issue 1124861 (http://bugs.python.org/issue1124861)? Do I need to create different stdin and stdout or spawn the child process in any other way from wexpect? Are there any other ways of solving this problem?

The error is because there is no console, but wexpect is attempting to 
use one.  The solution is to fix the code that assumes a console always 
exists - it doesn't.  I think you need to talk to the wexpect guys and 
see if either (a) you are misusing wexpect or (b) it is a bug in wexpect.

Cheers,

Mark




More information about the python-win32 mailing list