Gseos.ConsoleWrite
Previous  Top  Next

ConsoleWrite(szText, [iRed, iGreen, iBlue])

The ConsoleWrite() function writes text to the console window. All output (from print commands and so on) is redirected to this function. You can use it directly. The RGB parameters are optional and allow you to specify any text color. The default color is black.

ParameterDescription  
szTextThe text to write to the console window.  
iRed Optional parameter which specified the red component of the text color. This value can be in the range 0 to 255.  
iGreen Optional parameter which specified the green component of the text color. This value can be in the range 0 to 255.  
iBlue Optional parameter which specified the blue component of the text color. This value can be in the range 0 to 255.  

Returns
None

Comments
You usually don't use this function directly, however all standard Python functions you invoke that output any text will use this function indirectly. After your text is output a prompt will be displayed. In order to start the prompt on a new line you should include a carriage return character at the end of your output. The print statement will always print in black, if you want to print in a different color you will have to use this function.

Example
The following examples prints some text in red to the console window.

Gseos.ConsoleWrite("Hello, World", 255, 0, 0)