System.Console.WindowHeight

Here are the examples of the python api System.Console.WindowHeight taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

Example 1

Project: OWASP-ZSC Source File: ironpython_console.py
Function: clear_to_end_of_window
    def clear_to_end_of_window(self):
        oldtop = self.WindowTop
        lastline = self.WindowTop + System.Console.WindowHeight
        pos = self.pos()
        w, h = self.size()
        length = w - pos[0] + min((lastline - pos[1] - 1), 5) * w - 1
        self.write_color(length * " ")
        self.pos(*pos)
        self.WindowTop = oldtop

Example 2

Project: OWASP-ZSC Source File: ironpython_console.py
Function: scroll_window
    def scroll_window(self, lines):
        '''Scroll the window by the indicated number of lines.'''
        top = self.WindowTop + lines
        if top < 0:
            top = 0
        if top + System.Console.WindowHeight > System.Console.BufferHeight:
            top = System.Console.BufferHeight
        self.WindowTop = top

Example 3

Project: databus Source File: ironpython_console.py
Function: clear_to_end_of_window
    def clear_to_end_of_window(self):
        oldtop=self.WindowTop
        lastline=self.WindowTop+System.Console.WindowHeight
        pos=self.pos()
        w,h=self.size()
        length=w-pos[0]+min((lastline-pos[1]-1),5)*w-1
        self.write_color(length*" ")
        self.pos(*pos)
        self.WindowTop=oldtop

Example 4

Project: databus Source File: ironpython_console.py
Function: scroll_window
    def scroll_window(self, lines):
        '''Scroll the window by the indicated number of lines.'''
        top=self.WindowTop+lines
        if top<0:
            top=0
        if top+System.Console.WindowHeight>System.Console.BufferHeight:
            top=System.Console.BufferHeight
        self.WindowTop=top