I want to have a banner above my display. I use curses for my threaded display which looks like this:
Total Requests : $
Successful Requests : $
Failed Requests : $
Current Threads : $
Is it possible to add a banner at the top of Total Requests.
I tried using pyfiglet
but it's not working
def outputSpot():
global threads,counter,rcounter,logfile
curses.start_color()
curses.use_default_colors()
banner = Figlet(font='slant')
print(banner.renderText('Log Replay'))
for i in range(0, curses.COLORS):
curses.init_pair(i + 1, i, -1)
while True:
# stdscr.addstr(5,10, "Traffic Replay",curses.color_pair(51))
stdscr.addstr(6,0, "File Streaming:\t{0}".format(logfile),curses.color_pair(185))
stdscr.addstr(7,0, "Total Requests:\t\t{0}".format(counter),curses.color_pair(124))
stdscr.addstr(8,0, "Successful Requests:\t{0}".format(rcounter),curses.color_pair(76))
stdscr.addstr(9,0, "Failed Requests:\t{0}".format(fcounter),curses.color_pair(161))
stdscr.addstr(10,0, "Current Threads:\t{0} ".format(len(threads)),curses.color_pair(124))
stdscr.refresh()