From f8c6e2510012a4c5a5b3b5ee2e7842c02ee88d8b Mon Sep 17 00:00:00 2001 From: apuls Date: Fri, 5 Apr 2013 19:38:03 +0300 Subject: [PATCH] table like summary output The report looks like a table format. --- virustotal.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/virustotal.py b/virustotal.py index 7a99e1d..13ca960 100644 --- a/virustotal.py +++ b/virustotal.py @@ -380,9 +380,10 @@ def analyze(resource): return 0 print "Report:" + print ' {a1:<20} | {a2:<13} | {a3:<8} | {v:<}'.format(a1='Scanner',a2='EngineVersion',a3='DB Date',v='Virus') + print ' {s:->20} | {s:->13} | {s:->8} | {s:->28}'.format(s='') for antivirus, virus in report: - print "- %s (%s, %s):\t%s" % (antivirus[0], antivirus[1], antivirus[2], virus, ) - + print ' {a1:<20} | {a2:<13} | {a3:<8} | {v:<}'.format(a1=antivirus[0], a2=antivirus[1], a3=antivirus[2], v=virus,) print if __name__ == "__main__":