[Tutor] PyWin32 - Library of functions to interact with windows?

Katt the_only_katala at verizon.net
Wed Oct 14 18:38:00 CEST 2009

Hello all,

I am currently using WinXP and python 2.6.2
I just installed PyWin32 v214 for python 2.6 from the following link:


Installation seemed to go good as it walked me through while locating my 
python directory and checking my path.  I tried to first to download/save 
and then run it, but encountered an error and it would not install.  When I 
went back to the link and then clicked "run" instead of save the 
installation worked.

Now I find myself scratching my head and saying to myself: "now what?"

Your probably thinking - Dive into the documentation, Search the web, Ask 

I have looked a bit at the documentation.  It definitely seems to believe 
that I am already a seasoned programmer.

Searching the web I have found a lot of general information or overly 
specific with no way to narrow my search to what I am looking for.  I am not 
sure, but it seems very difficult just to search for a way to change the 
color of my text.  Don't get me wrong.  I don't want someone to hand me some 
code snippet of what I need.  I am just looking for an interpreter to 
translate from computer scientist to beginner.

Thus I am hopeful that Asking questions will yield information that I can 
I am not saying that there is anything wrong with what I have found.  I am 
only saying that my comprehension is not there yet to that level.

Looking at the included compiled documentation I think I found what I am 
looking for.  Please let me know if I am incorrect.

Searching under "change the color" revealed several topics.  I singled out 
win32gui.SetTextColor.  This brought me to the topic "win32api.RGB" and
shows the next line as "int = RGB(red,green,blue).

Question 1:  Did I locate the correct function that I need to use in order 
to change the color of text within a print ""?

Question 2: In order to use this would I just import it? (ie - from win32api 
import RGB)

Question 3: If the above 2 are correct is it just a matter of doing the 
    print "The remaining number of apples is: "RGB(red),number_apples

    The above print statement would yield just the number_apples variable in 
red text.

Thanks in advance,


More information about the Tutor mailing list