Stian wrote:
> > I've seen this myself, but couldn't reliably reproduce it.
> > If I recall, allocating a new console, and then immediately
> > freeing it seemed to clear the 'in-between' state.
>
> Man, that did the trick! Thanks! I added a win32console.AllocConsole()
> before the FreeConsole()
> I've seen this myself, but couldn't reliably reproduce it.
> If I recall, allocating a new console, and then immediately
> freeing it seemed to clear the 'in-between' state.
Man, that did the trick! Thanks! I added a win32console.AllocConsole()
before the FreeConsole() in the first try-except-c
> On Windows, by default, scripts with a .py extension are run by
> Python.exe, which is a console application. If you can write to stdout
> and see the results in a console window, then you have a console.
> Scripts with a .pyw extension are run by Pythonw.exe, which is a Windows
> application.
Stian wrote:
> > Well, let me ask a silly question. Are you running this from a "pyw"
> > app, using Pythonw.exe, so you don't have a console of your own?
>
> Well, that's not a silly question for me - I'm rather new to Python.
> Anyway - let me tell you a bit more about how this is put together
> Well, let me ask a silly question. Are you running this from a "pyw"
> app, using Pythonw.exe, so you don't have a console of your own?
Well, that's not a silly question for me - I'm rather new to Python. Anyway
- let me tell you a bit more about how this is put together if that may be
relevant
Stian wrote:
> > What error do you get? MSDN describes several different error returns.
> Actually I was wrong. The first error is "Handle is invalid". Then all
> following errors are "Access is denied.", which seems to be the same
> error I get when a console is already attached. But if this was
> What error do you get? MSDN describes several different error returns.
Actually I was wrong. The first error is "Handle is invalid". Then all
following errors are "Access is denied.", which seems to be the same error I
get when a console is already attached. But if this was the case - shouldn't
Stian wrote:
>
>
> I'm experiencing concurring problems when attempting to attach to a
> console using the PyWin32 win32console. I have an application which
> may attach to a console, send ctrl+c to it and then detach - using
> win32console. If I do this "too soon" after the console is started the
Hi,
I'm experiencing concurring problems when attempting to attach to a console
using the PyWin32 win32console. I have an application which may attach to a
console, send ctrl+c to it and then detach - using win32console. If I do
this "too soon" after the console is started the AttachConsole fails,