From 3b29343e151346d767909f9377293e7500490228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Tue, 2 Jan 2018 22:24:21 +0100 Subject: [PATCH] mirc2png.py:MiRCART.__init__(): move defaults from main(). --- mirc2png.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mirc2png.py b/mirc2png.py index 7cd95f5..d88ce8b 100755 --- a/mirc2png.py +++ b/mirc2png.py @@ -165,7 +165,7 @@ class MiRCART: self.inCurColourSpec = ""; self.state = self.State.STATE_CHAR; # }}} # {{{ Initialisation method - def __init__(self, inFilePath, imgFilePath, fontFilePath, fontSize): + def __init__(self, inFilePath, imgFilePath, fontFilePath="DejaVuSansMono.ttf", fontSize=11): self.inFilePath = inFilePath; self.inFile = open(inFilePath, "r"); self.inLines = self.inFile.readlines() self.inColsMax = self.getMaxCols(self.inLines) @@ -192,8 +192,8 @@ class MiRCART: # # Entry point -def main(argv0, inFilePath, imgFilePath, fontFilePath="DejaVuSansMono.ttf", fontSize=11): - _MiRCART = MiRCART(inFilePath, imgFilePath, fontFilePath, fontSize) +def main(*argv): + _MiRCART = MiRCART(*argv[1:]) if __name__ == "__main__": if ((len(sys.argv) - 1) < 2)\ or ((len(sys.argv) - 1) > 4):