[Tutor] PyWin32 - Library of functions to interact with windows?
Alan Gauld
alan.gauld at btinternet.com
Thu Oct 15 01:56:42 CEST 2009
"Scott Nelson" <sirgnip at gmail.com> wrote
> myself and I recently found some C code on the web [2] that does this and
> I
> translated that into to Python and pywin. It can be done in about 4
> lines
> of Python.
Yes, its much easier than I expected. I had never seen the
SetConsoleTextAttribute API call before nor the GetStdHandle
for accessing stdout. Thanks for the link.
> (While writing this email, I also discovered that you can control the
> cursor
> position in a win32 console with pywin! Fun!)
I'd still go for wconio for that kind of stuff - including
changing colors...
http://newcenturycomputers.net/projects/wconio.html
Alan G
More information about the Tutor
mailing list