--- a/eit.py Sat Nov 04 23:12:37 2017 +0100 +++ b/eit.py Fri Nov 24 02:08:53 2017 +0100 @@ -29,6 +29,9 @@ # seite 36, inhalt der for schleife! # https://www.dvb.org/resources/public/standards/a38_dvb-si_specification.pdf +#pylint: disable=missing-docstring +#pylint: disable=line-too-long + import os import struct import sys @@ -134,7 +137,7 @@ return alpha return ret -class EitList(object): +class eitinfo(object): """Eit File support class Description http://de.wikipedia.org/wiki/Event_Information_Table @@ -356,16 +359,17 @@ """Module docstring. Read Eit File and show the information. """ - eitlist = EitList(eitfile) - print "Name: ", eitlist.get_name() - print "Genre: ", eitlist.get_genre() - print "Components: ", eitlist.get_components() - print "StartDate: ", eitlist.get_date() - print "Description: ", eitlist.get_description() - print "Duration: ", eitlist.get_duration() - print "Minutes: ", eitlist.get_duration_seconds() / 60 + eitlist = eitinfo(eitfile) + out = "Movie name: %s" % eitlist.get_name() + out += "\nGenre: %s" % eitlist.get_genre() + out += "\nComponents: %s" % eitlist.get_components() + out += "\nStartDate: %s" % eitlist.get_date() + out += "\nDescription: %s" % eitlist.get_description() + out += "\nDuration: %02i:%02i:%02i" % eitlist.get_duration() + out += " (%s minutes)" % (eitlist.get_duration_seconds() / 60) - #eitlist.dumpEit() + print out + return out def main(): # parse command line options