1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 09:46:25 +00:00

PEP-8 codestyle (sorry for newline on long lines, PEP-8 want at max 78char-long lines...)

This commit is contained in:
Ciro Mattia Gonano
2013-03-06 22:47:17 +01:00
parent 6adc2dff93
commit 6836c6ee17
2 changed files with 13 additions and 8 deletions

View File

@@ -60,8 +60,10 @@ def buildHTML(path, imgfile):
"<head>\n",
"<title>", filename[0], "</title>\n",
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n",
"<link href=\"", "../" * (backref - 1), "stylesheet.css\" type=\"text/css\" rel=\"stylesheet\"/>\n",
"<link href=\"", "../" * (backref - 1), "page_styles.css\" type=\"text/css\" rel=\"stylesheet\"/>\n",
"<link href=\"", "../" * (backref - 1),
"stylesheet.css\" type=\"text/css\" rel=\"stylesheet\"/>\n",
"<link href=\"", "../" * (backref - 1),
"page_styles.css\" type=\"text/css\" rel=\"stylesheet\"/>\n",
"</head>\n",
"<body class=\"kcc\">\n",
"<div class=\"kcc1\"><img src=\"", "../" * backref, "Images/", postfix, imgfile, "\" alt=\"",

View File

@@ -117,10 +117,12 @@ class MainWindow:
self.optionsButtons = {}
for key in sorted(self.options):
if isinstance(self.options[key], IntVar) or isinstance(self.options[key], BooleanVar):
self.optionsButtons[key] = Checkbutton(self.master, text=self.optionlabels[key], variable=self.options[key])
self.optionsButtons[key] = Checkbutton(self.master, text=self.optionlabels[key],
variable=self.options[key])
self.optionsButtons[key].grid(columnspan=4, sticky=W + N + S)
elif isinstance(self.options[key], DoubleVar):
self.optionsButtons[key] = Checkbutton(self.master, text=self.optionlabels[key], command=self.change_gamma)
self.optionsButtons[key] = Checkbutton(self.master, text=self.optionlabels[key],
command=self.change_gamma)
self.optionsButtons[key].grid(columnspan=4, sticky=W + N + S)
self.aEntry = Entry(self.master, textvariable=self.options[key])
self.aEntry['state'] = DISABLED
@@ -193,7 +195,8 @@ class MainWindow:
self.master.update()
except Exception as err:
type_, value_, traceback_ = sys.exc_info()
tkMessageBox.showerror('KCC Error', "Error on file %s:\n%s\nTraceback:\n%s" (subargv[-1], str(err), traceback.format_tb(traceback_)))
tkMessageBox.showerror('KCC Error', "Error on file %s:\n%s\nTraceback:\n%s" %
(subargv[-1], str(err), traceback.format_tb(traceback_)))
errors = True
continue
if self.options['Aepub_only'].get() == 0: