Home | Trees | Indices | Help |
|
---|
|
object --+ | _MetaConsole
Contains methods shared by both the Console and Window classes.
Instance Methods | |||
|
|||
|
|||
iter((x, y), ...) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
(int, (r, g, b), (r, g, b)) |
|
||
(x, y) |
|
||
(width, height) |
|
||
|
|||
|
|||
iter((x, y), ...) |
|
||
|
|||
|
|||
|
|||
Inherited from |
Properties | |
console | |
height | |
width | |
Inherited from |
Method Details |
x.__init__(...) initializes x; see help(type(x)) for signature
|
Return an iterator with every possible (x, y) value for this console. It goes without saying that working on the console this way is a slow process, especially for Python, and should be minimized.
|
Blit another console or Window onto the current console. By default it blits the entire source to the top left corner.
|
Draws a single character.
|
Similar to draw_rect but only draws the outline of the rectangle.
|
Draws a rectangle starting from x and y and extending to width and height. If width or height are None then it will extend to the edge of the console.
|
Draws a string starting at x and y. Optionally colored. A string that goes past the right side will wrap around. A string wrapping to below the console will raise a TDLError but will still be written out. This means you can safely ignore the errors with a try... except block if you're fine with partially written strings. \r and \n are drawn on the console as normal character tiles. No special encoding is done and any string will translate to the character table as is. For a string drawing operation that respects special characters see
the
|
Return the character and colors of a tile as (ch, fg, bg) This method runs very slowly as is not recommended to be called frequently.
|
Return the virtual cursor position.
|
Move the virtual cursor.
|
Print a string at the virtual cursor. Handles special characters such as '\n' and '\r'. Printing past the bottom of the console will scroll everything upwards. Colors can be set with set_colors and the virtual cursor can be moved with move.
|
Scroll the contents of the console in the direction of x,y. Uncovered areas will be cleared. Does not move the virtual cursor.
|
Sets the colors to be used with the print_str function. Values of None will only leave the current values unchanged. |
Configure how this console will react to the cursor writing past the end if the console. This is for methods that use the virtual cursor, such as print_str.
|
This method mimics basic file-like behaviour. Because of this method you can replace sys.stdout or sys.stderr with a
This is a convoluted process and behaviour seen now can be excepted to change on later versions.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Aug 23 21:57:02 2014 | http://epydoc.sourceforge.net |