|
|
@ -5,8 +5,7 @@ results of queries.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
from result import QueryStatus
|
|
|
|
from result import QueryStatus
|
|
|
|
from colorama import Fore, Style
|
|
|
|
from colorama import Fore, Style
|
|
|
|
|
|
|
|
globvar = 0 # global variable to count the number of results.
|
|
|
|
globvar = 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QueryNotify:
|
|
|
|
class QueryNotify:
|
|
|
|
"""Query Notify Object.
|
|
|
|
"""Query Notify Object.
|
|
|
@ -186,7 +185,7 @@ class QueryNotifyPrint(QueryNotify):
|
|
|
|
# return
|
|
|
|
# return
|
|
|
|
|
|
|
|
|
|
|
|
def countResults(self):
|
|
|
|
def countResults(self):
|
|
|
|
"""Count the number of results. Every time the fuction is called,
|
|
|
|
"""This function counts the number of results. Every time the fuction is called,
|
|
|
|
the number of results is increasing.
|
|
|
|
the number of results is increasing.
|
|
|
|
|
|
|
|
|
|
|
|
Keyword Arguments:
|
|
|
|
Keyword Arguments:
|
|
|
@ -274,14 +273,14 @@ class QueryNotifyPrint(QueryNotify):
|
|
|
|
Return Value:
|
|
|
|
Return Value:
|
|
|
|
Nothing.
|
|
|
|
Nothing.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
numberOfResults = self.countResults() - 1
|
|
|
|
NumberOfResults = self.countResults() - 1
|
|
|
|
|
|
|
|
|
|
|
|
title = "Results:"
|
|
|
|
title = "Results:"
|
|
|
|
|
|
|
|
|
|
|
|
print(Style.BRIGHT + Fore.GREEN + "[" +
|
|
|
|
print(Style.BRIGHT + Fore.GREEN + "[" +
|
|
|
|
Fore.YELLOW + "*" +
|
|
|
|
Fore.YELLOW + "*" +
|
|
|
|
Fore.GREEN + f"] {title}" +
|
|
|
|
Fore.GREEN + f"] {title}" +
|
|
|
|
Fore.WHITE + f" {numberOfResults}" )
|
|
|
|
Fore.WHITE + f" {NumberOfResults}" )
|
|
|
|
|
|
|
|
|
|
|
|
title = "End"
|
|
|
|
title = "End"
|
|
|
|
|
|
|
|
|
|
|
|