deluge.ui.console.screen

class deluge.ui.console.screen.CursesStdIO

Bases: object

fake fd to be registered as a reader with the twisted reactor. Curses classes needing input should extend this

doRead()
called when input is ready
fileno()
We want to select on FD 0
logPrefix()
class deluge.ui.console.screen.Screen(stdscr, command_parser, tab_completer=None)

Bases: deluge.ui.console.screen.CursesStdIO

add_line(text)

Add a line to the screen. This will be showed between the two bars. The text can be formatted with color using the following format:

“{!fg, bg, attributes, ...!}”

See: http://docs.python.org/library/curses.html#constants for attributes.

Alternatively, it can use some built-in scheme for coloring. See colors.py for built-in schemes.

“{!scheme!}”

Examples:

“{!blue, black, bold!}My Text is {!white, black!}cool” “{!info!}I am some info text!” “{!error!}Uh oh!”

Parameter:text – str, the text to show
add_string(row, string)

Adds a string to the desired :param:row.

Parameter:row – int, the row number to write the string
close()
Clean up the curses stuff on exit.
connectionLost(reason)
doRead()
Called when there is data to be read, ie, input from the keyboard.
refresh()
Refreshes the screen. Updates the lines based on the`:attr:lines` based on the :attr:display_lines_offset attribute and the status bars.

Previous topic

deluge.ui.console.main

Next topic

deluge.ui.console.statusbars

This Page