diff --git a/pysollib/tk/tkhtml.py b/pysollib/tk/tkhtml.py
index 5b94dff7..0294651c 100644
--- a/pysollib/tk/tkhtml.py
+++ b/pysollib/tk/tkhtml.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
-# ---------------------------------------------------------------------------##
+# ---------------------------------------------------------------------------
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
@@ -19,21 +19,15 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
#
-# ---------------------------------------------------------------------------##
+# ---------------------------------------------------------------------------
__all__ = ['HTMLViewer']
# imports
-import os, sys
-import formatter
+import os
+import sys
import Tkinter
-if __name__ == '__main__':
- d = os.path.abspath(os.path.join(sys.path[0], '..', '..'))
- sys.path.append(d)
- import gettext
- gettext.install('pysol', d, unicode=True)
-
# PySol imports
from pysollib.mygettext import _
from pysollib.mfxutil import Struct
@@ -42,7 +36,14 @@ from pysollib.mfxutil import Struct
from tkwidget import MfxMessageDialog
from statusbar import HtmlStatusbar
-from pysollib.ui.tktile.tkhtml import Base_HTMLViewer, REMOTE_PROTOCOLS, tkHTMLWriter, tkHTMLParser
+from pysollib.ui.tktile.tkhtml import Base_HTMLViewer
+
+if __name__ == '__main__':
+ d = os.path.abspath(os.path.join(sys.path[0], '..', '..'))
+ sys.path.append(d)
+ import gettext
+ gettext.install('pysol', d, unicode=True)
+
# ************************************************************************
# *
@@ -61,13 +62,14 @@ class HTMLViewer(Base_HTMLViewer):
self.home = home
self.url = None
self.history = Struct(
- list = [],
- index = 0,
+ list=[],
+ index=0,
)
self.visited_urls = []
- self.images = {} # need to keep a reference because of garbage collection
+ # need to keep a reference because of garbage collection
+ self.images = {}
self.defcursor = parent["cursor"]
- ##self.defcursor = 'xterm'
+ # self.defcursor = 'xterm'
self.handcursor = "hand2"
# create buttons
@@ -135,7 +137,6 @@ def tkhtml_main(args):
top.mainloop()
return 0
+
if __name__ == "__main__":
sys.exit(tkhtml_main(sys.argv))
-
-
diff --git a/tests/style/py-flake8.t b/tests/style/py-flake8.t
index 79beaf9f..2e6d4835 100644
--- a/tests/style/py-flake8.t
+++ b/tests/style/py-flake8.t
@@ -27,7 +27,7 @@ my %skip =
# my $cmd = shell_quote( 'flake8', '.' );
my $cmd = shell_quote( 'flake8',
- grep { not exists $skip{$_} } glob('./*.py ./scripts/*.py ./tests/board_gen/*.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/tk/{[a-sw],ta,ti,to}*.py ./pysollib/ui/tktile/*.py') );
+ grep { not exists $skip{$_} } glob('./*.py ./scripts/*.py ./tests/board_gen/*.py ./pysollib/*.py ./pysollib/[cmgpuw]*/{*/*.py,*.py} ./pysollib/tile/*.py ./pysollib/tk/{[a-sw],ta,ti,to,tkhtml}*.py ./pysollib/ui/tktile/*.py') );
# TEST
eq_or_diff( scalar(`$cmd`), '', "flake8 is happy with the code." );