clean-up: fix PEP8 E265 block comment should start with '# '
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 21 Aug 2017 21:55:18 +0300
changeset 1782 5b6ad7a7fd9d
parent 1781 b112bfdde5cc
child 1783 3311eea28d56
clean-up: fix PEP8 E265 block comment should start with '# '
BeremizIDE.py
CodeFileTreeNode.py
ConfigTreeNode.py
IDEFrame.py
PLCControler.py
PLCGenerator.py
PLCOpenEditor.py
ProjectController.py
c_ext/CFileEditor.py
canfestival/canfestival.py
canfestival/config_utils.py
connectors/WAMP/__init__.py
controls/CustomToolTip.py
controls/DebugVariablePanel/DebugVariableGraphicViewer.py
controls/DebugVariablePanel/DebugVariableItem.py
controls/DebugVariablePanel/DebugVariablePanel.py
controls/DebugVariablePanel/DebugVariableTextViewer.py
controls/DebugVariablePanel/DebugVariableViewer.py
controls/DebugVariablePanel/GraphButton.py
controls/LibraryPanel.py
controls/PouInstanceVariablesPanel.py
controls/ProjectPropertiesPanel.py
controls/SearchResultPanel.py
controls/TextCtrlAutoComplete.py
controls/VariablePanel.py
dialogs/AboutDialog.py
dialogs/ActionBlockDialog.py
dialogs/ArrayTypeDialog.py
dialogs/BlockPreviewDialog.py
dialogs/BrowseLocationsDialog.py
dialogs/ConnectionDialog.py
dialogs/DurationEditorDialog.py
dialogs/FBDBlockDialog.py
dialogs/FBDVariableDialog.py
dialogs/ForceVariableDialog.py
dialogs/LDElementDialog.py
dialogs/LDPowerRailDialog.py
dialogs/PouNameDialog.py
dialogs/PouTransitionDialog.py
dialogs/SFCDivergenceDialog.py
dialogs/SFCStepDialog.py
dialogs/SFCStepNameDialog.py
dialogs/SFCTransitionDialog.py
dialogs/SearchInProjectDialog.py
doc/conf.py
editors/CodeFileEditor.py
editors/DataTypeEditor.py
editors/DebugViewer.py
editors/LDViewer.py
editors/ResourceEditor.py
editors/SFCViewer.py
editors/TextViewer.py
editors/Viewer.py
graphics/DebugDataConsumer.py
graphics/FBD_Objects.py
graphics/GraphicCommons.py
graphics/LD_Objects.py
graphics/RubberBand.py
graphics/SFC_Objects.py
graphics/ToolTipProducer.py
plcopen/definitions.py
plcopen/structures.py
py_ext/PythonEditor.py
runtime/NevowServer.py
runtime/WampClient.py
svgui/pyjs/build.py
svgui/pyjs/pyjs.py
targets/__init__.py
targets/toolchain_makefile.py
util/BitmapLibrary.py
util/Zeroconf.py
xmlclass/xmlclass.py
xmlclass/xsdschema.py
--- a/BeremizIDE.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/BeremizIDE.py	Mon Aug 21 21:55:18 2017 +0300
@@ -367,12 +367,12 @@
 
         self.MainTabs["LogConsole"] = (self.LogConsole, _("Console"))
         self.BottomNoteBook.AddPage(*self.MainTabs["LogConsole"])
-        #self.BottomNoteBook.Split(self.BottomNoteBook.GetPageIndex(self.LogConsole), wx.RIGHT)
+        # self.BottomNoteBook.Split(self.BottomNoteBook.GetPageIndex(self.LogConsole), wx.RIGHT)
 
         self.LogViewer = LogViewer(self.BottomNoteBook, self)
         self.MainTabs["LogViewer"] = (self.LogViewer, _("PLC Log"))
         self.BottomNoteBook.AddPage(*self.MainTabs["LogViewer"])
-        #self.BottomNoteBook.Split(self.BottomNoteBook.GetPageIndex(self.LogViewer), wx.RIGHT)
+        # self.BottomNoteBook.Split(self.BottomNoteBook.GetPageIndex(self.LogViewer), wx.RIGHT)
 
         StatusToolBar = wx.ToolBar(self, -1, wx.DefaultPosition, wx.DefaultSize,
                                    wx.TB_FLAT | wx.TB_NODIVIDER | wx.NO_BORDER)
@@ -1076,9 +1076,9 @@
                 self._Refresh(TITLE, FILEMENU, PROJECTTREE)
             dialog.Destroy()
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Highlights showing functions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
     def ShowHighlight(self, infos, start, end, highlight_type):
         config_name = self.Controler.GetProjectMainConfigurationName()
@@ -1092,9 +1092,9 @@
             IDEFrame.ShowHighlight(self, infos, start, end, highlight_type)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Exception Handler
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 import threading
 import traceback
 
@@ -1198,7 +1198,7 @@
             bug_report_path = path + os.sep + "bug_report_" + time.strftime("%Y_%m_%d__%H-%M-%S") + ".txt"
             save_bug_report(e_type, e_value, e_traceback, bug_report_path, date)
             Display_Exception_Dialog(e_type, e_value, e_traceback, bug_report_path)
-    #sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args)
+    # sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args)
     sys.excepthook = handle_exception
 
     init_old = threading.Thread.__init__
--- a/CodeFileTreeNode.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/CodeFileTreeNode.py	Mon Aug 21 21:55:18 2017 +0300
@@ -207,9 +207,9 @@
                     if variable.getonchange()])
         return ret
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                      Current Buffering Management Functions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
     """
     Return a copy of the codefile model
--- a/ConfigTreeNode.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/ConfigTreeNode.py	Mon Aug 21 21:55:18 2017 +0300
@@ -142,7 +142,7 @@
         return self.CTNParent.RemoteExec(script, **kwargs)
 
     def OnCTNSave(self, from_project_path=None):
-        #Default, do nothing and return success
+        """Default, do nothing and return success"""
         return True
 
     def GetParamsAttributes(self, path=None):
@@ -395,7 +395,7 @@
         # Get Current Name
         CurrentName = self.BaseParams.getName()
         # Do nothing if no change
-        #if CurrentName == DesiredName: return CurrentName
+        # if CurrentName == DesiredName: return CurrentName
         # Build a list of used Name out of parent's Children
         AllNames = []
         for CTNInstance in self.CTNParent.IterChildren():
@@ -444,7 +444,7 @@
         # Get Current IEC channel
         CurrentChannel = self.BaseParams.getIEC_Channel()
         # Do nothing if no change
-        #if CurrentChannel == DesiredChannel: return CurrentChannel
+        # if CurrentChannel == DesiredChannel: return CurrentChannel
         # Build a list of used Channels out of parent's Children
         AllChannels = self.GetAllChannels()
 
@@ -511,7 +511,7 @@
 
     def CTNRemove(self):
         # Fetch the confnode
-        #CTNInstance = self.GetChildByName(CTNName)
+        # CTNInstance = self.GetChildByName(CTNName)
         # Ask to his parent to remove it
         self.CTNParent._doRemoveChild(self)
 
--- a/IDEFrame.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/IDEFrame.py	Mon Aug 21 21:55:18 2017 +0300
@@ -72,9 +72,9 @@
     ID_PLCOPENEDITORDISPLAYMENUSWITCHPERSPECTIVE,
 ] = [wx.NewId() for _init_coll_DisplayMenu_Items in range(2)]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            EditorToolBar definitions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 # Define PLCOpenEditor Toolbar items id
 [
@@ -190,9 +190,9 @@
                "move", _("Move the view"))],
 }
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Helper Functions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 import base64
 
@@ -332,16 +332,12 @@
             return ComputeTabsLayout(tabs, rect)
     return tabs
 
-#-------------------------------------------------------------------------------
-#                              IDEFrame Base Class
-#-------------------------------------------------------------------------------
-
 
 UNEDITABLE_NAMES_DICT = dict([(_(name), name) for name in UNEDITABLE_NAMES])
 
 
 class IDEFrame(wx.Frame):
-
+    """IDEFrame Base Class"""
     # Compatibility function for wx versions < 2.6
     if wx.VERSION < (2, 6, 0):
         def Bind(self, event, function, id=None):
@@ -379,7 +375,7 @@
                    kind=wx.ITEM_NORMAL, text=_(u'Undo') + '\tCTRL+Z')
         AppendMenu(parent, help='', id=wx.ID_REDO,
                    kind=wx.ITEM_NORMAL, text=_(u'Redo') + '\tCTRL+Y')
-        #AppendMenu(parent, help='', id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO,
+        # AppendMenu(parent, help='', id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO,
         #      kind=wx.ITEM_CHECK, text=_(u'Enable Undo/Redo'))
         enable_undo_redo = _(u'Enable Undo/Redo')  # Keeping text in translations for possible menu reactivation
         parent.AppendSeparator()
@@ -409,7 +405,7 @@
                    kind=wx.ITEM_NORMAL, text=_(u'&Delete'))
         self.Bind(wx.EVT_MENU, self.OnUndoMenu, id=wx.ID_UNDO)
         self.Bind(wx.EVT_MENU, self.OnRedoMenu, id=wx.ID_REDO)
-        #self.Bind(wx.EVT_MENU, self.OnEnableUndoRedoMenu, id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO)
+        # self.Bind(wx.EVT_MENU, self.OnEnableUndoRedoMenu, id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO)
         self.Bind(wx.EVT_MENU, self.OnCutMenu, id=wx.ID_CUT)
         self.Bind(wx.EVT_MENU, self.OnCopyMenu, id=wx.ID_COPY)
         self.Bind(wx.EVT_MENU, self.OnPasteMenu, id=wx.ID_PASTE)
@@ -508,9 +504,9 @@
         self.TabsImageList = wx.ImageList(31, 16)
         self.TabsImageListIndexes = {}
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #                          Creating main structure
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         self.AUIManager = wx.aui.AuiManager(self)
         self.AUIManager.SetDockSizeConstraint(0.5, 0.5)
@@ -573,9 +569,9 @@
         self.AUIManager.AddPane(self.TabsOpened,
                                 wx.aui.AuiPaneInfo().CentrePane().Name("TabsPane"))
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #                    Creating PLCopen Project Types Tree
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         self.MainTabs = {}
 
@@ -612,9 +608,9 @@
                   id=ID_PLCOPENEDITORPROJECTTREE)
         self.ProjectTree.Bind(wx.EVT_MOTION, self.OnProjectTreeMotion)
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #        Creating PLCopen Project POU Instance Variables Panel
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         self.PouInstanceVariablesPanel = PouInstanceVariablesPanel(self.ProjectPanel, self, self.Controler, self.EnableDebug)
 
@@ -623,9 +619,9 @@
 
         self.ProjectPanel.SplitHorizontally(self.ProjectTree, self.PouInstanceVariablesPanel, 300)
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #                            Creating Tool Bar
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         MenuToolBar = wx.ToolBar(self, ID_PLCOPENEDITOREDITORMENUTOOLBAR,
                                  wx.DefaultPosition, wx.DefaultSize,
@@ -656,17 +652,17 @@
         self.Bind(wx.EVT_MENU, self.OnSelectionTool,
                   id=ID_PLCOPENEDITOREDITORTOOLBARSELECTION)
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #                            Creating Search Panel
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         self.SearchResultPanel = SearchResultPanel(self.BottomNoteBook, self)
         self.MainTabs["SearchResultPanel"] = (self.SearchResultPanel, _("Search"))
         self.BottomNoteBook.AddPage(*self.MainTabs["SearchResultPanel"])
 
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
         #                            Creating Library Panel
-        #-----------------------------------------------------------------------
+        # -----------------------------------------------------------------------
 
         self.LibraryPanel = LibraryPanel(self, True)
         self.MainTabs["LibraryPanel"] = (self.LibraryPanel, _("Library"))
@@ -701,8 +697,8 @@
         for imgname, itemtype in [
                 # editables
                 ("PROJECT",        ITEM_PROJECT),
-                #("POU",            ITEM_POU),
-                #("VARIABLE",       ITEM_VARIABLE),
+                # ("POU",          ITEM_POU),
+                # ("VARIABLE",     ITEM_VARIABLE),
                 ("TRANSITION",     ITEM_TRANSITION),
                 ("ACTION",         ITEM_ACTION),
                 ("CONFIGURATION",  ITEM_CONFIGURATION),
@@ -738,7 +734,7 @@
         self.SearchParams = None
         self.Highlights = {}
         self.DrawingMode = FREEDRAWING_MODE
-        #self.DrawingMode = DRIVENDRAWING_MODE
+        # self.DrawingMode = DRIVENDRAWING_MODE
         self.AuiTabCtrl = []
 
         # Save default perspective
@@ -788,9 +784,9 @@
                 notebook.SetSelection(idx)
                 return
 
-#-------------------------------------------------------------------------------
-#                Saving and restoring frame organization functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                Saving and restoring frame organization functions
+    # -------------------------------------------------------------------------------
 
     def GetTabInfos(self, tab):
         for page_name, (page_ref, page_title) in self.MainTabs.iteritems():
@@ -901,9 +897,9 @@
 
         self.Config.Flush()
 
-#-------------------------------------------------------------------------------
-#                               General Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                               General Functions
+    # -------------------------------------------------------------------------------
 
     def SetRefreshFunctions(self):
         self.RefreshFunctions = {
@@ -996,9 +992,9 @@
                               PROJECTTREE, POUINSTANCEVARIABLESPANEL, SCALING)
         dialog.Destroy()
 
-#-------------------------------------------------------------------------------
-#                            Notebook Unified Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            Notebook Unified Functions
+    # -------------------------------------------------------------------------------
 
     def AddPage(self, window, text):
         """Function that add a tab in Notebook, calling refresh for tab DClick event
@@ -1035,9 +1031,9 @@
         """
         return self.TabsOpened.SetPageBitmap(idx, bitmap)
 
-#-------------------------------------------------------------------------------
-#                         Dialog Message Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Dialog Message Functions
+    # -------------------------------------------------------------------------------
 
     def ShowErrorMessage(self, message):
         """Function displaying an Error dialog in editor.
@@ -1069,9 +1065,9 @@
 
         return True
 
-#-------------------------------------------------------------------------------
-#                            File Menu Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            File Menu Functions
+    # -------------------------------------------------------------------------------
 
     def RefreshFileMenu(self):
         pass
@@ -1150,9 +1146,9 @@
     def OnQuitMenu(self, event):
         self.Close()
 
-#-------------------------------------------------------------------------------
-#                            Edit Menu Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            Edit Menu Functions
+    # -------------------------------------------------------------------------------
 
     def RefreshEditMenu(self):
         MenuToolBar = self.Panes["MenuToolBar"]
@@ -1167,8 +1163,8 @@
             MenuToolBar.EnableTool(wx.ID_UNDO, undo)
             self.EditMenu.Enable(wx.ID_REDO, redo)
             MenuToolBar.EnableTool(wx.ID_REDO, redo)
-            #self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, True)
-            #self.EditMenu.Check(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO,
+            # self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, True)
+            # self.EditMenu.Check(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO,
             #                self.Controler.IsProjectBufferEnabled())
             self.EditMenu.Enable(wx.ID_FIND, selected > -1)
             self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUFINDNEXT,
@@ -1204,7 +1200,7 @@
             MenuToolBar.EnableTool(wx.ID_UNDO, False)
             self.EditMenu.Enable(wx.ID_REDO, False)
             MenuToolBar.EnableTool(wx.ID_REDO, False)
-            #self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, False)
+            # self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, False)
             self.EditMenu.Enable(wx.ID_CUT, False)
             MenuToolBar.EnableTool(wx.ID_CUT, False)
             self.EditMenu.Enable(wx.ID_COPY, False)
@@ -1337,9 +1333,9 @@
                 self.SearchResultPanel.SetSearchResults(criteria, result)
                 self.SelectTab(self.SearchResultPanel)
 
-#-------------------------------------------------------------------------------
-#                             Display Menu Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                             Display Menu Functions
+    # -------------------------------------------------------------------------------
 
     def RefreshDisplayMenu(self):
         if self.Controler is not None:
@@ -1388,9 +1384,9 @@
     def OnResetPerspective(self, event):
         self.ResetPerspective()
 
-#-------------------------------------------------------------------------------
-#                      Project Editor Panels Management Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                      Project Editor Panels Management Functions
+    # -------------------------------------------------------------------------------
 
     def OnPageDragged(self, event):
         wx.CallAfter(self.RefreshTabCtrlEvent)
@@ -1503,9 +1499,9 @@
             self.AUIManager.MaximizePane(pane)
         self.AUIManager.Update()
 
-#-------------------------------------------------------------------------------
-#                         Types Tree Management Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Types Tree Management Functions
+    # -------------------------------------------------------------------------------
 
     def RefreshProjectTree(self):
         # Extract current selected item tagname
@@ -2012,10 +2008,9 @@
 
         event.Skip()
 
-
-#-------------------------------------------------------------------------------
-#                         Instances Tree Management Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Instances Tree Management Functions
+    # -------------------------------------------------------------------------------
 
     def GetTreeImage(self, var_class):
         return self.TreeImageDict[var_class]
@@ -2098,16 +2093,16 @@
             self.DebugVariablePanel.InsertValue(iec_path, force=force, graph=graph)
             self.EnsureTabVisible(self.DebugVariablePanel)
 
-#-------------------------------------------------------------------------------
-#                         Library Panel Management Function
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Library Panel Management Function
+    # -------------------------------------------------------------------------------
 
     def RefreshLibraryPanel(self):
         self.LibraryPanel.RefreshTree()
 
-#-------------------------------------------------------------------------------
-#                          ToolBars Management Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          ToolBars Management Functions
+    # -------------------------------------------------------------------------------
 
     def AddToMenuToolBar(self, items):
         MenuToolBar = self.Panes["MenuToolBar"]
@@ -2175,10 +2170,9 @@
             self.CurrentMenu = menu
         self.ResetCurrentMode()
 
-
-#-------------------------------------------------------------------------------
-#                           EditorToolBar Items Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                           EditorToolBar Items Functions
+    # -------------------------------------------------------------------------------
 
     def ResetCurrentMode(self):
         selected = self.TabsOpened.GetSelection()
@@ -2314,10 +2308,9 @@
             else:
                 self.TabsOpened.GetPage(selected).AddJump()
 
-
-#-------------------------------------------------------------------------------
-#                         Add Project Elements Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Add Project Elements Functions
+    # -------------------------------------------------------------------------------
 
     def OnAddNewProject(self, event):
         # Asks user to create main program after creating new project
@@ -2440,9 +2433,9 @@
             self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, PROJECTTREE, LIBRARYTREE)
             self.EditProjectElement(ITEM_POU, result[0])
 
-#-------------------------------------------------------------------------------
-#                        Remove Project Elements Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Remove Project Elements Functions
+    # -------------------------------------------------------------------------------
 
     def CheckElementIsUsedBeforeDeletion(self, check_function, title, name):
         if not check_function(name):
@@ -2545,9 +2538,9 @@
                 self.TabsOpened.DeletePage(idx)
             self._Refresh(TITLE, FILEMENU, EDITMENU, PROJECTTREE, POUINSTANCEVARIABLESPANEL)
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def ShowHighlight(self, infos, start, end, highlight_type):
         self.SelectProjectTreeItem(infos[0])
@@ -2584,9 +2577,9 @@
     def ClearSearchResults(self):
         self.ClearHighlights(SEARCH_RESULT_HIGHLIGHT)
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Viewer Printout
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def UPPER_DIV(x, y):
@@ -2671,8 +2664,6 @@
         dc.SetClippingRegion(posX, posY, self.PageSize[0] * scale, self.PageSize[1] * scale)
         dc.SetUserScale(scale, scale)
 
-        #-------------------------------------------
-
         self.Viewer.DoDrawing(dc, True)
 
         return True
--- a/PLCControler.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/PLCControler.py	Mon Aug 21 21:55:18 2017 +0300
@@ -111,12 +111,9 @@
  DATA_TYPES, TRANSITIONS, ACTIONS, CONFIGURATIONS,
  RESOURCES, PROPERTIES] = UNEDITABLE_NAMES
 
-#-------------------------------------------------------------------------------
-#                 Helper object for loading library in xslt stylesheets
-#-------------------------------------------------------------------------------
-
 
 class LibraryResolver(etree.Resolver):
+    """Helper object for loading library in xslt stylesheets"""
 
     def __init__(self, controller, debug=False):
         self.Controller = controller
@@ -136,10 +133,10 @@
                     lib_el.append(deepcopy(ctn["types"]))
             return self.resolve_string(etree.tostring(lib_el), context)
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #           Helpers functions for translating list of arguments
 #                       from xslt to valid arguments
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def _StringValue(x):
@@ -155,9 +152,9 @@
             for translate, arg in
             zip(translations, args)]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                 Helpers object for generating pou var list
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class _VariableInfos(object):
@@ -208,9 +205,9 @@
             [_StringValue] * 5 + [_BoolValue] + [_StringValue], args) +
             [self.GetType(), self.GetTree()])))
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #            Helpers object for generating pou variable instance list
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def class_extraction(value):
@@ -266,25 +263,18 @@
                     [_StringValue, class_extraction, _StringValue] +
                     [_BoolValue] * 2, args) + [[]])))
 
-#-------------------------------------------------------------------------------
-#            Helpers object for generating instances path list
-#-------------------------------------------------------------------------------
-
 
 class InstancesPathFactory:
-
+    """Helpers object for generating instances path list"""
     def __init__(self, instances):
         self.Instances = instances
 
     def AddInstance(self, context, *args):
         self.Instances.append(args[0][0])
 
-#-------------------------------------------------------------------------------
-#            Helpers object for generating instance tagname
-#-------------------------------------------------------------------------------
-
 
 class InstanceTagName:
+    """Helpers object for generating instance tagname"""
 
     def __init__(self, controller):
         self.Controller = controller
@@ -308,9 +298,10 @@
     def TransitionTagName(self, context, *args):
         self.TagName = self.Controller.ComputePouTransitionName(args[0][0], args[0][1])
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #           Helpers object for generating pou block instances list
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 _Point = namedtuple("Point", ["x", "y"])
@@ -465,9 +456,6 @@
 pou_block_instances_xslt = etree.parse(
     os.path.join(ScriptDirectory, "plcopen", "pou_block_instances.xslt"))
 
-#-------------------------------------------------------------------------------
-#                         Undo Buffer for PLCOpenEditor
-#-------------------------------------------------------------------------------
 
 # Length of the buffer
 UNDO_BUFFER_LENGTH = 20
@@ -475,6 +463,7 @@
 
 class UndoBuffer:
     """
+    Undo Buffer for PLCOpenEditor
     Class implementing a buffer of changes made on the current editing model
     """
 
@@ -555,13 +544,9 @@
         return self.LastSave == self.CurrentIndex
 
 
-#-------------------------------------------------------------------------------
-#                           Controler for PLCOpenEditor
-#-------------------------------------------------------------------------------
-
-
 class PLCControler:
     """
+    Controler for PLCOpenEditor
     Class which controls the operations made on the plcopen model and answers to view requests
     """
 
@@ -597,9 +582,9 @@
         else:
             return self.Project
 
-#-------------------------------------------------------------------------------
-#                         Project management functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Project management functions
+    # -------------------------------------------------------------------------------
 
     # Return if a project is opened
     def HasOpenedProject(self):
@@ -961,9 +946,9 @@
             row, col = next_row, next_col
         return infos
 
-#-------------------------------------------------------------------------------
-#                        Project Pous management functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Project Pous management functions
+    # -------------------------------------------------------------------------------
 
     # Add a Data Type to Project
     def ProjectAddDataType(self, datatype_name=None):
@@ -1957,9 +1942,9 @@
                 values.extend(confnodetype["types"].GetEnumeratedDataTypeValues())
         return values
 
-#-------------------------------------------------------------------------------
-#                   Project Element tag name computation functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                   Project Element tag name computation functions
+    # -------------------------------------------------------------------------------
 
     # Compute a data type name
     def ComputeDataTypeName(self, datatype):
@@ -1996,9 +1981,9 @@
             "R": ITEM_RESOURCE
         }[words[0]]
 
-#-------------------------------------------------------------------------------
-#                    Project opened Data types management functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                    Project opened Data types management functions
+    # -------------------------------------------------------------------------------
 
     # Return the data type informations
     def GetDataTypeInfos(self, tagname, debug=False):
@@ -2197,9 +2182,9 @@
                 datatype.initialValue = None
             self.BufferProject()
 
-#-------------------------------------------------------------------------------
-#                       Project opened Pous management functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                       Project opened Pous management functions
+    # -------------------------------------------------------------------------------
 
     # Return edited element
     def GetEditedElement(self, tagname, debug=False):
@@ -3271,9 +3256,9 @@
                 self.SetFilePath(filepath)
             return True
 
-#-------------------------------------------------------------------------------
-#                       Search in Current Project Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                       Search in Current Project Functions
+    # -------------------------------------------------------------------------------
 
     def SearchInProject(self, criteria):
         return self.Project.Search(criteria)
@@ -3291,14 +3276,12 @@
             return search_results
         return []
 
-#-------------------------------------------------------------------------------
-#                      Current Buffering Management Functions
-#-------------------------------------------------------------------------------
-
-    """
-    Return a copy of the project
-    """
+    # -------------------------------------------------------------------------------
+    #                      Current Buffering Management Functions
+    # -------------------------------------------------------------------------------
+
     def Copy(self, model):
+        """Return a copy of the project"""
         return deepcopy(model)
 
     def CreateProjectBuffer(self, saved):
--- a/PLCGenerator.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/PLCGenerator.py	Mon Aug 21 21:55:18 2017 +0300
@@ -85,18 +85,18 @@
     else:
         return mylist
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                  Specific exception for PLC generating errors
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class PLCGenException(Exception):
     pass
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Generator of PLC program
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ProgramGenerator:
@@ -480,9 +480,9 @@
         return self.Program
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Generator of POU programs
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 [ConnectorClass, ContinuationClass, ActionBlockClass] = [
     PLCOpenParser.GetElementClass(instance_name, "commonObjects")
--- a/PLCOpenEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/PLCOpenEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -85,9 +85,9 @@
 from dialogs import ProjectDialog
 from dialogs.AboutDialog import ShowAboutDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            PLCOpenEditor Main Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 # Define PLCOpenEditor FileMenu extra items id
 [
@@ -158,9 +158,9 @@
     def _init_coll_HelpMenu_Items(self, parent):
         AppendMenu(parent, help='', id=wx.ID_HELP,
                    kind=wx.ITEM_NORMAL, text=_(u'PLCOpenEditor') + '\tF1')
-        #AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
+        # AppendMenu(parent, help='', id=wx.ID_HELP_CONTENTS,
         #      kind=wx.ITEM_NORMAL, text=u'PLCOpen\tF2')
-        #AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
+        # AppendMenu(parent, help='', id=wx.ID_HELP_CONTEXT,
         #      kind=wx.ITEM_NORMAL, text=u'IEC 61131-3\tF3')
 
         def handler(event):
@@ -176,7 +176,7 @@
         AppendMenu(parent, help='', id=wx.ID_ABOUT,
                    kind=wx.ITEM_NORMAL, text=_(u'About'))
         self.Bind(wx.EVT_MENU, self.OnPLCOpenEditorMenu, id=wx.ID_HELP)
-        #self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
+        # self.Bind(wx.EVT_MENU, self.OnPLCOpenMenu, id=wx.ID_HELP_CONTENTS)
         self.Bind(wx.EVT_MENU, self.OnAboutMenu, id=wx.ID_ABOUT)
 
     def __init__(self, parent, fileOpen=None):
@@ -231,9 +231,9 @@
         else:
             self.SetTitle(name)
 
-#-------------------------------------------------------------------------------
-#                            File Menu Functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            File Menu Functions
+    # -------------------------------------------------------------------------------
 
     def RefreshFileMenu(self):
         MenuToolBar = self.Panes["MenuToolBar"]
@@ -401,9 +401,9 @@
             self._Refresh(TITLE, FILEMENU, PAGETITLES)
         dialog.Destroy()
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Exception Handler
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 Max_Traceback_List_Size = 20
@@ -506,7 +506,7 @@
                 for a in lst:
                     output.write(a+":\n"+str(info[a])+"\n\n")
 
-    #sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args)
+    # sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args)
     sys.excepthook = handle_exception
 
 
--- a/ProjectController.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/ProjectController.py	Mon Aug 21 21:55:18 2017 +0300
@@ -1027,7 +1027,7 @@
                 "init_calls": "\n    ".join([
                       "init_level=%d; " % (i+1) +
                       "if((res = __init_%s(argc,argv))){" % locstr +
-                      #"printf(\"%s\"); "%locstr + #for debug
+                      # "printf(\"%s\"); "%locstr + #for debug
                       "return res;}" for i, locstr in enumerate(locstrs)]),
                 "cleanup_calls": "\n    ".join([
                       "if(init_level >= %d) " % i +
@@ -1557,7 +1557,7 @@
         data_tuple = self.IECdebug_datas.get(IECPath, None)
         if data_tuple is not None:
             WeakCallableDict, data_log, status, fvalue, buffer_list = data_tuple
-            #data_log.append((debug_tick, value))
+            # data_log.append((debug_tick, value))
             for weakcallable, buffer_list in WeakCallableDict.iteritems():
                 function = getattr(weakcallable, function_name, None)
                 if function is not None:
@@ -1583,7 +1583,7 @@
         while (not self.debug_break) and (self._connector is not None):
             plc_status, Traces = self._connector.GetTraceVariables()
             debug_getvar_retry += 1
-            #print [dict.keys() for IECPath, (dict, log, status, fvalue) in self.IECdebug_datas.items()]
+            # print [dict.keys() for IECPath, (dict, log, status, fvalue) in self.IECdebug_datas.items()]
             if plc_status == "Started":
                 if len(Traces) > 0:
                     Failed = False
@@ -1681,7 +1681,7 @@
             self.logger.write_error(_("Couldn't stop PLC !\n"))
 
         # debugthread should die on his own
-        #self.KillDebugThread()
+        # self.KillDebugThread()
 
         wx.CallAfter(self.UpdateMethodsFromPLCStatus)
 
@@ -1763,7 +1763,7 @@
             else:
                 status = ""
 
-            #self.logger.write(_("PLC is %s\n")%status)
+            # self.logger.write(_("PLC is %s\n")%status)
 
             if self.previous_plcstate in ["Started", "Stopped"]:
                 if self.DebugAvailable() and self.GetIECProgramsAndVariables():
@@ -1789,7 +1789,7 @@
                 self.EnableMethod("_Transfer", True)
                 # warns controller that program match
                 self.ProgramTransferred()
-                #self.EnableMethod("_Transfer", False)
+                # self.EnableMethod("_Transfer", False)
         else:
             # self.logger.write_warning(
             #     _("Cannot compare latest build to target. Please build.\n"))
--- a/c_ext/CFileEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/c_ext/CFileEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -54,12 +54,11 @@
         self.StyleSetSpec(stc.STC_C_OPERATOR, 'bold,size:%(size)d' % faces)
         self.StyleSetSpec(stc.STC_C_STRINGEOL, 'back:#FFD5FF,size:%(size)d' % faces)
 
-#-------------------------------------------------------------------------------
-#                          CFileEditor Main Frame Class
-#-------------------------------------------------------------------------------
-
 
 class CFileEditor(CodeFileEditor):
+    """
+    CFileEditor Main Frame Class
+    """
 
     CONFNODEEDITOR_TABS = [
         (_("C code"), "_create_CodePanel")]
--- a/canfestival/canfestival.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/canfestival/canfestival.py	Mon Aug 21 21:55:18 2017 +0300
@@ -56,9 +56,9 @@
 from util.TranslationCatalogs import AddCatalog
 AddCatalog(os.path.join(CanFestivalPath, "objdictgen", "locale"))
 
-#--------------------------------------------------
+# --------------------------------------------------
 #              Location Tree Helper
-#--------------------------------------------------
+# --------------------------------------------------
 
 
 def GetSlaveLocationTree(slave_node, current_location, name):
@@ -82,9 +82,9 @@
             "location": ".".join([str(i) for i in current_location]) + ".x",
             "children": entries}
 
-#--------------------------------------------------
+# --------------------------------------------------
 #                    SLAVE
-#--------------------------------------------------
+# --------------------------------------------------
 
 
 class _SlaveCTN(NodeManager):
@@ -245,9 +245,9 @@
     def GetBufferState(self):
         return self.GetCurrentBufferState()
 
-#--------------------------------------------------
+# --------------------------------------------------
 #                    MASTER
-#--------------------------------------------------
+# --------------------------------------------------
 
 
 class MiniNodeManager(NodeManager):
--- a/canfestival/config_utils.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/canfestival/config_utils.py	Mon Aug 21 21:55:18 2017 +0300
@@ -61,9 +61,9 @@
 
 TrashVariables = [(1, 0x01), (8, 0x05), (16, 0x06), (32, 0x07), (64, 0x1B)]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                  Specific exception for PDO mapping errors
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class PDOmappingException(Exception):
@@ -340,9 +340,9 @@
         @param sync_TPDOs: indicate if TPDO must be synchronous
         """
 
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
         #               Verify that locations correspond to real slave variables
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
 
         # Get list of locations check if exists and mappables -> put them in IECLocations
         for location in locations:
@@ -420,9 +420,9 @@
                         _("Not PDO mappable variable : '{a1}' (ID:{a2},Idx:{a3},sIdx:{a4}))").
                         format(a1=name, a2=nodeid, a3="%x" % index, a4="%x" % subindex))
 
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
         #                         Search for locations already mapped
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
 
         for name, locationinfos in self.IECLocations.items():
             node = self.NodeList.SlaveNodes[locationinfos["nodeid"]]["Node"]
@@ -472,9 +472,9 @@
                     self.LocationsNotMapped[locationinfos["nodeid"]] = {TPDO: [], RPDO: []}
                 self.LocationsNotMapped[locationinfos["nodeid"]][locationinfos["pdotype"]].append((name, locationinfos))
 
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
         #                         Build concise DCF for the others locations
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
 
         for nodeid, locations in self.LocationsNotMapped.items():
             node = self.NodeList.SlaveNodes[nodeid]["Node"]
@@ -520,9 +520,9 @@
             # Add number of params and data to node DCF
             self.AddParamsToDCF(nodeid, dataparams, nbparams)
 
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
         #                         Master Node Configuration
-        #-------------------------------------------------------------------------------
+        # -------------------------------------------------------------------------------
 
         # Generate Master's Configuration from informations stored in MasterMapping
         for cobid, pdo_infos in self.MasterMapping.items():
--- a/connectors/WAMP/__init__.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/connectors/WAMP/__init__.py	Mon Aug 21 21:55:18 2017 +0300
@@ -25,7 +25,6 @@
 import sys
 import traceback
 import atexit
-#from twisted.python import log
 from twisted.internet import reactor, threads
 from autobahn.twisted import wamp
 from autobahn.twisted.websocket import WampWebSocketClientFactory, connectWS
@@ -123,7 +122,7 @@
                     errmess = traceback.format_exc()
                     confnodesroot.logger.write_error(errmess+"\n")
                     print errmess
-                    #confnodesroot._SetConnector(None)
+                    # confnodesroot._SetConnector(None)
             return PLCObjDefaults.get(funcname)
         return catcher_func
 
--- a/controls/CustomToolTip.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/CustomToolTip.py	Mon Aug 21 21:55:18 2017 +0300
@@ -30,9 +30,9 @@
 TOOLTIP_MAX_LINE = 5         # Maximum number of line in ToolTip
 TOOLTIP_WAIT_PERIOD = 0.5    # Wait period before displaying tooltip in second
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Custom ToolTip
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class CustomToolTip(wx.PopupWindow):
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -63,9 +63,9 @@
 # Color for graph cursor
 CURSOR_COLOR = '#800080'
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                      Debug Variable Graphic Viewer Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def merge_ranges(ranges):
@@ -104,9 +104,9 @@
     # Return range expended from 10 %
     return center - range_size * 0.55, center + range_size * 0.55
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                   Debug Variable Graphic Viewer Drop Target
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableGraphicDropTarget(wx.TextDropTarget):
@@ -235,9 +235,9 @@
         dialog.Destroy()
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                      Debug Variable Graphic Viewer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableGraphicViewer(DebugVariableViewer, FigureCanvas):
--- a/controls/DebugVariablePanel/DebugVariableItem.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableItem.py	Mon Aug 21 21:55:18 2017 +0300
@@ -27,16 +27,16 @@
 
 from graphics.DebugDataConsumer import DebugDataConsumer, TYPE_TRANSLATOR
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                 Constant for calculate CRC for string variables
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 STRING_CRC_SIZE = 8
 STRING_CRC_MASK = 2 ** STRING_CRC_SIZE - 1
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          Debug Variable Item Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableItem(DebugDataConsumer):
--- a/controls/DebugVariablePanel/DebugVariablePanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -76,9 +76,9 @@
 
     return next_tick
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                    Debug Variable Graphic Panel Drop Target
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableDropTarget(wx.TextDropTarget):
@@ -171,11 +171,6 @@
         dialog.Destroy()
 
 
-#-------------------------------------------------------------------------------
-#                      Debug Variable Graphic Panel Class
-#-------------------------------------------------------------------------------
-
-
 class DebugVariablePanel(wx.Panel, DebugViewer):
     """
     Class that implements a Viewer that display variable values as a graphs
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -30,9 +30,9 @@
 from DebugVariableViewer import DebugVariableViewer
 from GraphButton import GraphButton
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                     Debug Variable Text Viewer Drop Target
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableTextDropTarget(wx.TextDropTarget):
@@ -140,9 +140,9 @@
         dialog.Destroy()
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                      Debug Variable Text Viewer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 class DebugVariableTextViewer(DebugVariableViewer, wx.Panel):
     """
--- a/controls/DebugVariablePanel/DebugVariableViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -46,9 +46,9 @@
 HIGHLIGHT_RESIZE_PEN = wx.Pen(wx.Colour(200, 200, 200))
 HIGHLIGHT_RESIZE_BRUSH = wx.Brush(wx.Colour(200, 200, 200))
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Base Debug Variable Viewer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugVariableViewer:
--- a/controls/DebugVariablePanel/GraphButton.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/DebugVariablePanel/GraphButton.py	Mon Aug 21 21:55:18 2017 +0300
@@ -26,9 +26,9 @@
 
 from util.BitmapLibrary import GetBitmap
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Custom button for Graphic Viewer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class GraphButton():
--- a/controls/LibraryPanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/LibraryPanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -24,15 +24,17 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                 Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+
 
 [CATEGORY, BLOCK] = range(2)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                              Library Panel
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LibraryPanel(wx.Panel):
--- a/controls/PouInstanceVariablesPanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/PouInstanceVariablesPanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -370,8 +370,8 @@
         event.x = size.width / 2
         event.y = size.height / 2
         event.SetEventObject(self.InstanceChoice)
-        #event = wx.KeyEvent(wx.EVT_KEY_DOWN._getEvtType())
-        #event.m_keyCode = wx.WXK_SPACE
+        # event = wx.KeyEvent(wx.EVT_KEY_DOWN._getEvtType())
+        # event.m_keyCode = wx.WXK_SPACE
         self.InstanceChoice.GetEventHandler().ProcessEvent(event)
 
     def OnParentButtonClick(self, event):
--- a/controls/ProjectPropertiesPanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/ProjectPropertiesPanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -25,9 +25,9 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                 Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 REQUIRED_PARAMS = ["projectName", "productName", "productVersion", "companyName"]
 
@@ -36,9 +36,10 @@
     POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES
 ] = range(10)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                       Project Properties Panel
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ProjectPropertiesPanel(wx.Notebook):
--- a/controls/SearchResultPanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/SearchResultPanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -41,9 +41,10 @@
         return "element %d %s" % (infos[1], infos[2])
     return "%s:" % infos[0]
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                            Search Result Panel
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 [
--- a/controls/TextCtrlAutoComplete.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py	Mon Aug 21 21:55:18 2017 +0300
@@ -134,8 +134,8 @@
 
         self.SetChoices(choices)
 
-        #gp = self
-        #while ( gp != None ) :
+        # gp = self
+        # while ( gp != None ) :
         #    gp.Bind ( wx.EVT_MOVE , self.onControlChanged, gp )
         #    gp.Bind ( wx.EVT_SIZE , self.onControlChanged, gp )
         #    gp = gp.GetParent()
--- a/controls/VariablePanel.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/controls/VariablePanel.py	Mon Aug 21 21:55:18 2017 +0300
@@ -39,9 +39,12 @@
 from util.BitmapLibrary import GetBitmap
 from PLCControler import _VariableInfos
 from util.TranslationCatalogs import NoTranslate
-#-------------------------------------------------------------------------------
+
+
+# -------------------------------------------------------------------------------
 #                                 Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+
 
 [
     TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE,
@@ -103,9 +106,10 @@
 LOCATION_MODEL = re.compile("((?:%[IQM](?:\*|(?:[XBWLD]?[0-9]+(?:\.[0-9]+)*)))?)$")
 VARIABLE_NAME_SUFFIX_MODEL = re.compile("([0-9]*)$")
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                            Variables Panel Table
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class VariableTable(CustomTable):
@@ -241,9 +245,10 @@
                 grid.SetCellTextColour(row, col, highlight_colours[1])
             self.ResizeRow(grid, row)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                         Variable Panel Drop Target
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class VariableDropTarget(wx.TextDropTarget):
@@ -427,9 +432,10 @@
         message.ShowModal()
         message.Destroy()
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                               Variable Panel
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class VariablePanel(wx.Panel):
@@ -980,9 +986,9 @@
             self.Controler.BufferProject()
             self.ParentWindow._Refresh(TITLE, FILEMENU, EDITMENU, PAGETITLES, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.Table.ResetView(self.VariablesGrid)
--- a/dialogs/AboutDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/AboutDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -37,8 +37,6 @@
 from wx.lib.agw.hyperlink import HyperLinkCtrl
 
 
-#----------------------------------------------------------------------
-
 class AboutDialog(wx.Dialog):
     """
     A replacement About Dialog for Windows, as it uses a generic frame that
@@ -106,8 +104,6 @@
         CreditsDialog(self, self.info)
 
 
-#----------------------------------------------------------------------
-
 class CreditsDialog(wx.Dialog):
     def __init__(self, parent, info):
         wx.Dialog.__init__(self, parent, title=_("Credits"), size=(475, 320),
@@ -144,8 +140,6 @@
         close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
 
 
-#----------------------------------------------------------------------
-
 class LicenseDialog(wx.Dialog):
     def __init__(self, parent, info):
         wx.Dialog.__init__(self, parent, title=_("License"), size=(500, 400),
@@ -173,8 +167,6 @@
 
         close.Bind(wx.EVT_BUTTON, lambda evt: self.Destroy())
 
-#----------------------------------------------------------------------
-
 
 def ShowAboutDialog(parent, info):
     if os.name == "nt":
--- a/dialogs/ActionBlockDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/ActionBlockDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -30,9 +30,9 @@
 from util.BitmapLibrary import GetBitmap
 from PLCControler import _ActionInfos
 from util.TranslationCatalogs import NoTranslate
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                  Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def GetActionTableColnames():
@@ -44,9 +44,9 @@
     _ = NoTranslate
     return [_("Action"), _("Variable"), _("Inline")]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Action Table
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ActionTable(CustomTable):
@@ -114,9 +114,9 @@
                 grid.SetCellBackgroundColour(row, col, wx.WHITE)
             self.ResizeRow(grid, row)
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Action Block Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ActionBlockDialog(wx.Dialog):
--- a/dialogs/ArrayTypeDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/ArrayTypeDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,15 +28,15 @@
 
 from controls import CustomEditableListBox
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                  Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 DIMENSION_MODEL = re.compile("([0-9]+)\.\.([0-9]+)$")
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                             Array Type Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ArrayTypeDialog(wx.Dialog):
--- a/dialogs/BlockPreviewDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/BlockPreviewDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,9 @@
 from plcopen.structures import TestIdentifier, IEC_KEYWORDS
 from graphics.GraphicCommons import FREEDRAWING_MODE
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                    Dialog with preview for graphic block
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class BlockPreviewDialog(wx.Dialog):
--- a/dialogs/BrowseLocationsDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/BrowseLocationsDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -32,9 +32,9 @@
 from util.BitmapLibrary import GetBitmap
 from util.TranslationCatalogs import NoTranslate
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                   Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def GetDirFilterChoiceOptions():
@@ -61,9 +61,9 @@
     for type in types:
         LOCATION_SIZES[type] = size
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Browse Locations Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class BrowseLocationsDialog(wx.Dialog):
--- a/dialogs/ConnectionDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/ConnectionDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -29,9 +29,9 @@
 from graphics.FBD_Objects import FBD_Connector
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                       Set Connection Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ConnectionDialog(BlockPreviewDialog):
--- a/dialogs/DurationEditorDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/DurationEditorDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -27,9 +27,9 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                  Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 MICROSECONDS = 0.001
 MILLISECONDS = 1
@@ -49,9 +49,9 @@
     ("Microseconds", _('Microseconds:')),
 ]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Edit Duration Value Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DurationEditorDialog(wx.Dialog):
--- a/dialogs/FBDBlockDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/FBDBlockDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -31,17 +31,17 @@
 from controls.LibraryPanel import LibraryPanel
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                    Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def GetBlockTypeDefaultNameModel(blocktype):
     return re.compile("%s[0-9]+" % blocktype if blocktype is not None else ".*")
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Set Block Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class FBDBlockDialog(BlockPreviewDialog):
--- a/dialogs/FBDVariableDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/FBDVariableDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -29,9 +29,9 @@
 from graphics.FBD_Objects import FBD_Variable
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                    Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 # Dictionaries containing correspondence between variable block class and string
 # to be shown in Class combo box in both sense
@@ -44,9 +44,9 @@
 VARIABLE_CLASSES_DICT_REVERSE = dict(
     [(value, key) for key, value in VARIABLE_CLASSES_DICT.iteritems()])
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Set Variable Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class FBDVariableDialog(BlockPreviewDialog):
--- a/dialogs/ForceVariableDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/ForceVariableDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -26,9 +26,9 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 LOCATIONDATATYPES = {"X": ["BOOL"],
                      "B": ["SINT", "USINT", "BYTE", "STRING"],
@@ -161,9 +161,9 @@
                 "DT": getdatetime,
                 "TOD": gettimeofday}
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Force Variable Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ForceVariableDialog(wx.TextEntryDialog):
--- a/dialogs/LDElementDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/LDElementDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -31,9 +31,9 @@
 from graphics.LD_Objects import LD_Contact, LD_Coil
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                       Set Ladder Element Parmeters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LDElementDialog(BlockPreviewDialog):
--- a/dialogs/LDPowerRailDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/LDPowerRailDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -29,9 +29,9 @@
 from graphics.LD_Objects import LD_PowerRail
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                    Set Ladder Power Rail Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LDPowerRailDialog(BlockPreviewDialog):
--- a/dialogs/PouNameDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/PouNameDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -24,9 +24,9 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                POU Name Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class PouNameDialog(wx.TextEntryDialog):
--- a/dialogs/PouTransitionDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/PouTransitionDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,9 @@
 from plcopen.structures import TestIdentifier, IEC_KEYWORDS
 from util.TranslationCatalogs import NoTranslate
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                POU Transition Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def GetTransitionLanguages():
--- a/dialogs/SFCDivergenceDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/SFCDivergenceDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -30,9 +30,9 @@
 from graphics.SFC_Objects import SFC_Divergence
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Create New Divergence Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFCDivergenceDialog(BlockPreviewDialog):
--- a/dialogs/SFCStepDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/SFCStepDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,9 @@
 from graphics.SFC_Objects import SFC_Step
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Set SFC Step Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFCStepDialog(BlockPreviewDialog):
--- a/dialogs/SFCStepNameDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/SFCStepNameDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -24,9 +24,9 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          Edit Step Name Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFCStepNameDialog(wx.TextEntryDialog):
--- a/dialogs/SFCTransitionDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/SFCTransitionDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,9 @@
 from graphics.SFC_Objects import SFC_Transition
 from BlockPreviewDialog import BlockPreviewDialog
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Set Transition Parameters Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFCTransitionDialog(BlockPreviewDialog):
--- a/dialogs/SearchInProjectDialog.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/dialogs/SearchInProjectDialog.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,9 @@
 from plcopen.plcopen import *
 from util.TranslationCatalogs import NoTranslate
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          Search In Project Dialog
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def GetElementsChoices():
--- a/doc/conf.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/doc/conf.py	Mon Aug 21 21:55:18 2017 +0300
@@ -17,12 +17,12 @@
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+# sys.path.insert(0, os.path.abspath('.'))
 
 # -- General configuration -----------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
+# needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
@@ -35,7 +35,7 @@
 source_suffix = '.rst'
 
 # The encoding of source files.
-#source_encoding = 'utf-8-sig'
+# source_encoding = 'utf-8-sig'
 
 # The master toctree document.
 master_doc = 'index'
@@ -55,40 +55,40 @@
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
+# language = None
 
 gettext_compact = False
 locale_dirs = ["locale/"]
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
-#today = ''
+# today = ''
 # Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+# today_fmt = '%B %d, %Y'
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 exclude_patterns = ['_build']
 
 # The reST default role (used for this markup: `text`) to use for all documents.
-#default_role = None
+# default_role = None
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
+# add_function_parentheses = True
 
 # If true, the current module name will be prepended to all description
 # unit titles (such as .. function::).
-#add_module_names = True
+# add_module_names = True
 
 # If true, sectionauthor and moduleauthor directives will be shown in the
 # output. They are ignored by default.
-#show_authors = False
+# show_authors = False
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
 
 # A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
+# modindex_common_prefix = []
 
 
 # -- Options for HTML output ---------------------------------------------------
@@ -100,26 +100,26 @@
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#html_theme_options = {}
+# html_theme_options = {}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+# html_theme_path = []
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-#html_title = None
+# html_title = None
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
+# html_short_title = None
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
-#html_logo = None
+# html_logo = None
 
 # The name of an image file (within the static path) to use as favicon of the
 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 # pixels large.
-#html_favicon = None
+# html_favicon = None
 
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
@@ -128,44 +128,44 @@
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+# html_last_updated_fmt = '%b %d, %Y'
 
 # If true, SmartyPants will be used to convert quotes and dashes to
 # typographically correct entities.
-#html_use_smartypants = True
+# html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+# html_sidebars = {}
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
-#html_additional_pages = {}
+# html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_domain_indices = True
+# html_domain_indices = True
 
 # If false, no index is generated.
-#html_use_index = True
+# html_use_index = True
 
 # If true, the index is split into individual pages for each letter.
-#html_split_index = False
+# html_split_index = False
 
 # If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
+# html_show_sourcelink = True
 
 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
+# html_show_sphinx = True
 
 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
+# html_show_copyright = True
 
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the
 # base URL from which the finished HTML is served.
-#html_use_opensearch = ''
+# html_use_opensearch = ''
 
 # This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# html_file_suffix = None
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'Beremizdoc'
@@ -175,13 +175,13 @@
 
 latex_elements = {
     # The paper size ('letterpaper' or 'a4paper').
-    #'papersize': 'letterpaper',
+    # 'papersize': 'letterpaper',
 
     # The font size ('10pt', '11pt' or '12pt').
-    #'pointsize': '10pt',
+    # 'pointsize': '10pt',
 
     # Additional stuff for the LaTeX preamble.
-    #'preamble': '',
+    # 'preamble': '',
 }
 
 # Grouping the document tree into LaTeX files. List of tuples
@@ -193,23 +193,23 @@
 
 # The name of an image file (relative to this directory) to place at the top of
 # the title page.
-#latex_logo = None
+# latex_logo = None
 
 # For "manual" documents, if this is true, then toplevel headings are parts,
 # not chapters.
-#latex_use_parts = False
+# latex_use_parts = False
 
 # If true, show page references after internal links.
-#latex_show_pagerefs = False
+# latex_show_pagerefs = False
 
 # If true, show URL addresses after external links.
-#latex_show_urls = False
+# latex_show_urls = False
 
 # Documents to append as an appendix to all manuals.
-#latex_appendices = []
+# latex_appendices = []
 
 # If false, no module index is generated.
-#latex_domain_indices = True
+# latex_domain_indices = True
 
 
 # -- Options for manual page output --------------------------------------------
@@ -222,7 +222,7 @@
 ]
 
 # If true, show URL addresses after external links.
-#man_show_urls = False
+# man_show_urls = False
 
 
 # -- Options for Texinfo output ------------------------------------------------
@@ -237,10 +237,10 @@
 ]
 
 # Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
+# texinfo_appendices = []
 
 # If false, no module index is generated.
-#texinfo_domain_indices = True
+# texinfo_domain_indices = True
 
 # How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+# texinfo_show_urls = 'footnote'
--- a/editors/CodeFileEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/CodeFileEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -549,9 +549,9 @@
                 self.RemoveHighlight(*self.CurrentFindHighlight)
             self.CurrentFindHighlight = None
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.RefreshView(True)
@@ -597,9 +597,9 @@
             self.SetStyling(len(self.GetText()) - highlight_end_pos, stc.STC_STYLE_DEFAULT)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Helper for VariablesGrid values
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 class VariablesTable(CustomTable):
 
@@ -852,9 +852,9 @@
         event.Skip()
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          CodeFileEditor Main Frame Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 class CodeFileEditor(ConfTreeNodeEditor):
 
--- a/editors/DataTypeEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/DataTypeEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -37,9 +37,9 @@
 from util.BitmapLibrary import GetBitmap
 from util.TranslationCatalogs import NoTranslate
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                                    Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 DIMENSION_MODEL = re.compile("([0-9]+)\.\.([0-9]+)$")
 
@@ -60,9 +60,9 @@
 
 DATATYPE_TYPES_DICT = dict([(_(datatype), datatype) for datatype in GetDatatypeTypes()])
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Structure Elements Table
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ElementsTable(CustomTable):
@@ -140,9 +140,9 @@
             col_highlights = row_highlights.setdefault(infos[1], [])
         col_highlights.append(highlight_type)
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          Datatype Editor class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DataTypeEditor(EditorPanel):
@@ -777,9 +777,9 @@
         self.ParentWindow.RefreshFileMenu()
         self.ParentWindow.RefreshEditMenu()
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.RefreshView()
--- a/editors/DebugViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/DebugViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -30,9 +30,9 @@
 REFRESH_PERIOD = 0.1         # Minimum time between 2 refresh
 DEBUG_REFRESH_LOCK = Lock()  # Common refresh lock for all debug viewers
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Debug Viewer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugViewer:
--- a/editors/LDViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/LDViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -160,9 +160,9 @@
         element_tree[element]["weight"] = max(1, weight / parts)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                     Ladder Diagram Graphic elements Viewer class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LD_Viewer(Viewer):
@@ -176,9 +176,9 @@
         self.RungComments = []
         self.CurrentLanguage = "LD"
 
-#-------------------------------------------------------------------------------
-#                          Refresh functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Refresh functions
+    # -------------------------------------------------------------------------------
 
     def ResetView(self):
         self.Rungs = []
@@ -258,9 +258,9 @@
                 if not inserted:
                     self.RungComments.append(element)
 
-#-------------------------------------------------------------------------------
-#                          Search Element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Search Element functions
+    # -------------------------------------------------------------------------------
 
     def FindRung(self, element):
         for i, rung in enumerate(self.Rungs):
@@ -302,9 +302,9 @@
                 elements.append(element)
         return elements
 
-#-------------------------------------------------------------------------------
-#                          Mouse event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Mouse event functions
+    # -------------------------------------------------------------------------------
 
     def OnViewerLeftDown(self, event):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -392,9 +392,9 @@
                 wx.CallAfter(self.SetCurrentCursor, 0)
         event.Skip()
 
-#-------------------------------------------------------------------------------
-#                          Keyboard event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Keyboard event functions
+    # -------------------------------------------------------------------------------
 
     def OnChar(self, event):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -443,9 +443,9 @@
             else:
                 event.Skip()
 
-#-------------------------------------------------------------------------------
-#                  Model adding functions from Drop Target
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                  Model adding functions from Drop Target
+    # -------------------------------------------------------------------------------
 
     def AddVariableBlock(self, x, y, scaling, var_class, var_name, var_type):
         if var_type == "BOOL":
@@ -483,9 +483,9 @@
         else:
             Viewer.AddVariableBlock(self, x, y, scaling, var_class, var_name, var_type)
 
-#-------------------------------------------------------------------------------
-#                          Adding element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Adding element functions
+    # -------------------------------------------------------------------------------
 
     def AddLadderRung(self):
         dialog = LDElementDialog(self.ParentWindow, self.Controler, "coil")
@@ -901,9 +901,9 @@
         message.ShowModal()
         message.Destroy()
 
-#-------------------------------------------------------------------------------
-#                          Delete element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Delete element functions
+    # -------------------------------------------------------------------------------
 
     def DeleteContact(self, contact):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -1089,9 +1089,9 @@
                 self.RefreshRungs(new_bbox.height - old_bbox.height, rungindex + 1)
                 self.SelectedElement = None
 
-#-------------------------------------------------------------------------------
-#                        Refresh element position functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Refresh element position functions
+    # -------------------------------------------------------------------------------
 
     def RefreshPosition(self, element, recursive=True):
         # If element is LeftPowerRail, no need to update position
@@ -1194,9 +1194,9 @@
                     if self.IsBlock(element):
                         self.RefreshPosition(element)
 
-#-------------------------------------------------------------------------------
-#                          Edit element content functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Edit element content functions
+    # -------------------------------------------------------------------------------
 
     def EditPowerRailContent(self, powerrail):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
--- a/editors/ResourceEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/ResourceEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -33,9 +33,12 @@
 from util.BitmapLibrary import GetBitmap
 from plcopen.structures import LOCATIONDATATYPES, TestIdentifier, IEC_KEYWORDS, DefaultType
 from util.TranslationCatalogs import NoTranslate
-#-------------------------------------------------------------------------------
+
+
+# -------------------------------------------------------------------------------
 #                          Configuration Editor class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+
 
 [
     ID_CONFIGURATIONEDITOR,
@@ -62,9 +65,9 @@
         return self.Controler.GetEditedElement(self.TagName) is None
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Resource Editor class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 def GetTasksTableColnames():
     _ = NoTranslate
@@ -195,10 +198,9 @@
                 grid.SetCellTextColour(row, col, highlight_colours[1])
             self.ResizeRow(grid, row)
 
-
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def AddHighlight(self, infos, highlight_type):
         row_highlights = self.Highlights.setdefault(infos[0], {})
@@ -507,9 +509,9 @@
         self.InstancesGrid.RefreshButtons()
         event.Skip()
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.RefreshView()
--- a/editors/SFCViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/SFCViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -213,9 +213,9 @@
         else:
             return None
 
-#-------------------------------------------------------------------------------
-#                          Mouse event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Mouse event functions
+    # -------------------------------------------------------------------------------
 
     def OnViewerLeftDown(self, event):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -356,9 +356,9 @@
             return False
         return True
 
-#-------------------------------------------------------------------------------
-#                          Keyboard event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Keyboard event functions
+    # -------------------------------------------------------------------------------
 
     def OnChar(self, event):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -425,9 +425,9 @@
             else:
                 event.Skip()
 
-#-------------------------------------------------------------------------------
-#                          Adding element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Adding element functions
+    # -------------------------------------------------------------------------------
 
     def AddInitialStep(self, pos):
         dialog = SFCStepNameDialog(self.ParentWindow, _("Please enter step name"), _("Add a new initial step"), "", wx.OK | wx.CANCEL)
@@ -814,9 +814,9 @@
                 self.Refresh(False)
             dialog.Destroy()
 
-#-------------------------------------------------------------------------------
-#                          Delete element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Delete element functions
+    # -------------------------------------------------------------------------------
 
     def DeleteStep(self, step):
         if self.GetDrawingMode() == FREEDRAWING_MODE:
@@ -1076,9 +1076,9 @@
         if self.GetDrawingMode() == FREEDRAWING_MODE:
             Viewer.DeleteWire(self, wire)
 
-#-------------------------------------------------------------------------------
-#                          Model update functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Model update functions
+    # -------------------------------------------------------------------------------
 
     def RefreshBlockModel(self, block):
         blockid = block.GetId()
--- a/editors/TextViewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/TextViewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -33,9 +33,9 @@
 from EditorPanel import EditorPanel
 from controls.CustomStyledTextCtrl import CustomStyledTextCtrl, faces, GetCursorPos, NAVIGATION_KEYS
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Textual programs Viewer class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 NEWLINE = "\n"
@@ -915,9 +915,9 @@
         self.Editor.AutoCompCancel()
         event.Skip()
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.RefreshView()
--- a/editors/Viewer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/editors/Viewer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -227,9 +227,9 @@
     else:
         return cmp(y1, y2)
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                       Graphic elements Viewer base class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 # ID Constants for alignment menu items
@@ -941,9 +941,9 @@
     def GetMiniFont(self):
         return self.MiniTextDC.GetFont()
 
-#-------------------------------------------------------------------------------
-#                         Element management functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Element management functions
+    # -------------------------------------------------------------------------------
 
     def AddBlock(self, block):
         self.Blocks[block.GetId()] = block
@@ -1084,9 +1084,9 @@
             element.SetSize(width, height)
             element.RefreshModel()
 
-#-------------------------------------------------------------------------------
-#                              Reset functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                              Reset functions
+    # -------------------------------------------------------------------------------
 
     # Resets Viewer lists
     def ResetView(self):
@@ -1204,10 +1204,9 @@
             self.RefreshVisibleElements()
             self.Editor.Refresh(False)
 
-
-#-------------------------------------------------------------------------------
-#                          Refresh functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Refresh functions
+    # -------------------------------------------------------------------------------
 
     def ElementNeedRefresh(self, element):
         self.ElementRefreshList_lock.acquire()
@@ -1531,9 +1530,9 @@
     def GetBlockType(self, type, inputs=None):
         return self.Controler.GetBlockType(type, inputs, self.Debug)
 
-#-------------------------------------------------------------------------------
-#                          Search Element functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Search Element functions
+    # -------------------------------------------------------------------------------
 
     def FindBlock(self, event):
         dc = self.GetLogicalDC()
@@ -1604,9 +1603,9 @@
         self.SelectedElement.SetElements(self.GetElements())
         self.SelectedElement.SetSelected(True)
 
-#-------------------------------------------------------------------------------
-#                           Popup menu functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                           Popup menu functions
+    # -------------------------------------------------------------------------------
 
     def GetForceVariableMenuFunction(self, iec_path, element):
         iec_type = self.GetDataType(iec_path)
@@ -1738,9 +1737,9 @@
         self.Editor.PopupMenu(menu)
         menu.Destroy()
 
-#-------------------------------------------------------------------------------
-#                            Menu items functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            Menu items functions
+    # -------------------------------------------------------------------------------
 
     def OnAlignLeftMenu(self, event):
         if self.SelectedElement is not None and isinstance(self.SelectedElement, Graphic_Group):
@@ -1967,9 +1966,9 @@
             wx.CallAfter(func)
         return ClipboardCallback
 
-#-------------------------------------------------------------------------------
-#                          Mouse event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Mouse event functions
+    # -------------------------------------------------------------------------------
 
     def OnViewerMouseEvent(self, event):
         self.ResetBuffer()
@@ -2467,9 +2466,9 @@
                         (_(u'Variable'), self.GetAddToWireMenuCallBack(self.AddNewVariable, True)))
         return items
 
-#-------------------------------------------------------------------------------
-#                          Keyboard event functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Keyboard event functions
+    # -------------------------------------------------------------------------------
 
     ARROW_KEY_MOVE = {
         wx.WXK_LEFT: (-1, 0),
@@ -2545,9 +2544,9 @@
         else:
             event.Skip()
 
-#-------------------------------------------------------------------------------
-#                  Model adding functions from Drop Target
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                  Model adding functions from Drop Target
+    # -------------------------------------------------------------------------------
 
     def AddVariableBlock(self, x, y, scaling, var_class, var_name, var_type):
         id = self.GetNewId()
@@ -2568,9 +2567,9 @@
         self.RefreshVisibleElements()
         self.Editor.Refresh(False)
 
-#-------------------------------------------------------------------------------
-#                          Model adding functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Model adding functions
+    # -------------------------------------------------------------------------------
 
     def GetScaledSize(self, width, height):
         if self.Scaling is not None:
@@ -2822,9 +2821,9 @@
             self.AddNewElement(actionblock, bbox, wire)
         dialog.Destroy()
 
-#-------------------------------------------------------------------------------
-#                          Edit element content functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Edit element content functions
+    # -------------------------------------------------------------------------------
 
     def EditBlockContent(self, block):
         dialog = FBDBlockDialog(self.ParentWindow, self.Controler, self.TagName)
@@ -3130,9 +3129,9 @@
             comment.Refresh(rect)
         dialog.Destroy()
 
-#-------------------------------------------------------------------------------
-#                          Model update functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Model update functions
+    # -------------------------------------------------------------------------------
 
     def RefreshBlockModel(self, block):
         blockid = block.GetId()
@@ -3279,10 +3278,9 @@
         infos["connector"] = actionblock.GetConnector()
         self.Controler.SetEditedElementActionBlockInfos(self.TagName, actionblockid, infos)
 
-
-#-------------------------------------------------------------------------------
-#                          Model delete functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                          Model delete functions
+    # -------------------------------------------------------------------------------
 
     def DeleteBlock(self, block):
         elements = []
@@ -3429,10 +3427,9 @@
         self.RemoveBlock(actionblock)
         self.Controler.RemoveEditedElementInstance(self.TagName, actionblock.GetId())
 
-
-#-------------------------------------------------------------------------------
-#                            Editing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            Editing functions
+    # -------------------------------------------------------------------------------
 
     def Cut(self):
         if not self.Debug and (self.IsBlock(self.SelectedElement) or self.IsComment(self.SelectedElement) or isinstance(self.SelectedElement, Graphic_Group)):
@@ -3563,9 +3560,9 @@
                 self.Controler.AddEditedElementActionBlock(self.TagName, block.GetId())
                 self.RefreshActionBlockModel(block)
 
-#-------------------------------------------------------------------------------
-#                         Find and Replace functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                         Find and Replace functions
+    # -------------------------------------------------------------------------------
 
     def Find(self, direction, search_params):
         if self.SearchParams != search_params:
@@ -3606,9 +3603,9 @@
                 self.RemoveHighlight(*self.CurrentFindHighlight)
             self.CurrentFindHighlight = None
 
-#-------------------------------------------------------------------------------
-#                        Highlights showing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                        Highlights showing functions
+    # -------------------------------------------------------------------------------
 
     def OnRefreshHighlightsTimer(self, event):
         self.RefreshView()
@@ -3647,9 +3644,9 @@
                 if block is not None:
                     block.AddHighlight(infos[2:], start, end, highlight_type)
 
-#-------------------------------------------------------------------------------
-#                            Drawing functions
-#-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
+    #                            Drawing functions
+    # -------------------------------------------------------------------------------
 
     def OnScrollWindow(self, event):
         if self.Editor.HasCapture() and self.StartMousePos is not None:
--- a/graphics/DebugDataConsumer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/DebugDataConsumer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -24,9 +24,10 @@
 
 import datetime
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                        Date and Time conversion function
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 SECOND = 1000000      # Number of microseconds in one second
 MINUTE = 60 * SECOND  # Number of microseconds in one minute
@@ -149,9 +150,10 @@
     "REAL": lambda v: "%.6g" % v,
     "LREAL": lambda v: "%.6g" % v}
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                            Debug Data Consumer Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class DebugDataConsumer:
--- a/graphics/FBD_Objects.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/FBD_Objects.py	Mon Aug 21 21:55:18 2017 +0300
@@ -27,9 +27,10 @@
 from graphics.GraphicCommons import *
 from plcopen.structures import *
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                         Function Block Diagram Block
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def TestConnectorName(name, block_type):
@@ -495,9 +496,9 @@
             DrawHighlightedText(dc, self.Type, self.Highlights.get("type", []), type_pos[0], type_pos[1])
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Function Block Diagram Variable
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class FBD_Variable(Graphic_Element):
@@ -629,7 +630,7 @@
         # if a name is given
         if name is not None:
             # Test input and output connector if they exists
-            #if self.Input and name == self.Input.GetName():
+            # if self.Input and name == self.Input.GetName():
             #    return self.Input
             if self.Output and name == self.Output.GetName():
                 return self.Output
@@ -791,9 +792,10 @@
         if not getattr(dc, "printing", False):
             DrawHighlightedText(dc, self.Name, self.Highlights, text_pos[0], text_pos[1])
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                        Function Block Diagram Connector
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class FBD_Connector(Graphic_Element):
--- a/graphics/GraphicCommons.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/GraphicCommons.py	Mon Aug 21 21:55:18 2017 +0300
@@ -31,9 +31,9 @@
 from graphics.ToolTipProducer import ToolTipProducer
 from graphics.DebugDataConsumer import DebugDataConsumer
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                               Common constants
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 """
 Definition of constants for dimensions of graphic elements
@@ -211,9 +211,10 @@
     pen.SetCap(wx.CAP_PROJECTING)
     return pen
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                    Helpers for highlighting text
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def AddHighlight(highlights, infos):
@@ -248,9 +249,10 @@
     dc.SetPen(current_pen)
     dc.SetTextForeground(wx.BLACK)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                           Graphic element base class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class Graphic_Element(ToolTipProducer):
@@ -703,9 +705,9 @@
                 dc.SetUserScale(scalex, scaley)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Group of graphic elements
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class Graphic_Group(Graphic_Element):
@@ -1021,9 +1023,10 @@
         for element in self.Elements:
             element.Draw(dc)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                         Connector for all types of blocks
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class Connector(DebugDataConsumer, ToolTipProducer):
@@ -1471,7 +1474,7 @@
         if self.Selected:
             dc.SetPen(MiterPen(wx.BLUE, 3))
             dc.SetBrush(wx.WHITE_BRUSH)
-        #elif len(self.Highlights) > 0:
+        # elif len(self.Highlights) > 0:
         #    dc.SetPen(MiterPen(self.Highlights[-1][1]))
         #    dc.SetBrush(wx.Brush(self.Highlights[-1][0]))
         else:
@@ -1556,9 +1559,10 @@
             dc.SetFont(self.ParentBlock.Parent.GetFont())
             dc.SetTextForeground(wx.BLACK)
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                           Common Wire Element
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class Wire(Graphic_Element, DebugDataConsumer):
@@ -2447,11 +2451,11 @@
     def OnLeftDown(self, event, dc, scaling):
         pos = GetScaledEventPosition(event, dc, scaling)
         # Test if a point have been handled
-        #result = self.TestPoint(pos)
-        #if result != None:
+        # result = self.TestPoint(pos)
+        # if result != None:
         #    self.Handle = (HANDLE_POINT, result)
         #    wx.CallAfter(self.Parent.SetCurrentCursor, 1)
-        #else:
+        # else:
         # Test if a segment have been handled
         result = self.TestSegment(pos)
         if result is not None:
@@ -2752,9 +2756,9 @@
             dc.SetTextForeground(wx.BLACK)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Graphic comment element
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def FilterHighlightsByRow(highlights, row, length):
--- a/graphics/LD_Objects.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/LD_Objects.py	Mon Aug 21 21:55:18 2017 +0300
@@ -28,9 +28,10 @@
 from graphics.DebugDataConsumer import DebugDataConsumer
 from plcopen.structures import *
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                         Ladder Diagram PowerRail
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LD_PowerRail(Graphic_Element):
@@ -339,9 +340,9 @@
             connector.Draw(dc)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Ladder Diagram Contact
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LD_Contact(Graphic_Element, DebugDataConsumer):
@@ -514,7 +515,7 @@
         # if a name is given
         if name is not None:
             # Test input and output connector
-            #if name == self.Input.GetName():
+            # if name == self.Input.GetName():
             #    return self.Input
             if name == self.Output.GetName():
                 return self.Output
@@ -685,9 +686,10 @@
                 elif typetext != "":
                     DrawHighlightedText(dc, typetext, highlights, type_pos[0], type_pos[1])
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                         Ladder Diagram Coil
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class LD_Coil(Graphic_Element):
@@ -833,7 +835,7 @@
         # if a name is given
         if name is not None:
             # Test input and output connector
-            #if self.Input and name == self.Input.GetName():
+            # if self.Input and name == self.Input.GetName():
             #    return self.Input
             if self.Output and name == self.Output.GetName():
                 return self.Output
--- a/graphics/RubberBand.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/RubberBand.py	Mon Aug 21 21:55:18 2017 +0300
@@ -26,9 +26,10 @@
 
 from graphics.GraphicCommons import GetScaledEventPosition
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                               Viewer RubberBand
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class RubberBand:
--- a/graphics/SFC_Objects.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/SFC_Objects.py	Mon Aug 21 21:55:18 2017 +0300
@@ -35,9 +35,9 @@
     else:
         return SFC_WIRE_MIN_SIZE
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                         Sequencial Function Chart Step
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFC_Step(Graphic_Element, DebugDataConsumer):
@@ -221,7 +221,7 @@
             bbx_height = self.Size[1] + CONNECTOR_SIZE
             if self.Output:
                 bbx_height += CONNECTOR_SIZE
-        #self.BoundingBox = wx.Rect(self.Pos.x, bbx_y, bbx_width + 1, bbx_height + 1)
+        # self.BoundingBox = wx.Rect(self.Pos.x, bbx_y, bbx_width + 1, bbx_height + 1)
         self.BoundingBox = wx.Rect(self.Pos.x, self.Pos.y, self.Size[0] + 1, self.Size[1] + 1)
 
     # Refresh the positions of the step connectors
@@ -257,7 +257,7 @@
         # if a name is given
         if name is not None:
             # Test input, output and action connector if they exists
-            #if self.Input and name == self.Input.GetName():
+            # if self.Input and name == self.Input.GetName():
             #    return self.Input
             if self.Output and name == self.Output.GetName():
                 return self.Output
@@ -568,9 +568,9 @@
             DrawHighlightedText(dc, self.Name, self.Highlights, name_pos[0], name_pos[1])
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                       Sequencial Function Chart Transition
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFC_Transition(Graphic_Element, DebugDataConsumer):
@@ -777,7 +777,7 @@
         # if a name is given
         if name is not None:
             # Test input and output connector
-            #if name == self.Input.GetName():
+            # if name == self.Input.GetName():
             #    return self.Input
             if name == self.Output.GetName():
                 return self.Output
@@ -1037,9 +1037,10 @@
                 else:
                     DrawHighlightedText(dc, condition, highlights, condition_pos[0], condition_pos[1])
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                Sequencial Function Chart Divergence and Convergence
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFC_Divergence(Graphic_Element):
@@ -1249,7 +1250,7 @@
         # if a name is given
         if name is not None:
             # Test each input and output connector
-            #for input in self.Inputs:
+            # for input in self.Inputs:
             #    if name == input.GetName():
             #        return input
             for output in self.Outputs:
@@ -1500,9 +1501,10 @@
             output.Draw(dc)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                   Sequencial Function Chart Jump to Step
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+
 
 class SFC_Jump(Graphic_Element):
     """
@@ -1775,9 +1777,9 @@
             DrawHighlightedText(dc, self.Target, self.Highlights, target_pos[0], target_pos[1])
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                   Sequencial Function Chart Action Block
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class SFC_ActionBlock(Graphic_Element):
--- a/graphics/ToolTipProducer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/graphics/ToolTipProducer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -26,9 +26,10 @@
 
 from controls.CustomToolTip import CustomToolTip, TOOLTIP_WAIT_PERIOD
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                           Tool Tip Producer class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class ToolTipProducer:
--- a/plcopen/definitions.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/plcopen/definitions.py	Mon Aug 21 21:55:18 2017 +0300
@@ -42,9 +42,9 @@
                      "D": ["DINT", "UDINT", "REAL", "DWORD"],
                      "L": ["LINT", "ULINT", "LREAL", "LWORD"]}
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Function Block Types definitions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 StdTC6Libs = [(_("Standard function blocks"),   join(sd, "Standard_Function_Blocks.xml")),
               (_("Additional function blocks"), join(sd, "Additional_Function_Blocks.xml"))]
@@ -61,9 +61,9 @@
         for var_name, var_type, var_modifier in infos["inputs"]]
     return infos
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Data Types definitions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 """
@@ -105,7 +105,7 @@
     ("WORD", "ANY_NBIT"),
     ("DWORD", "ANY_NBIT"),
     ("LWORD", "ANY_NBIT")
-    #("WSTRING", "ANY_STRING") # TODO
+    # ("WSTRING", "ANY_STRING") # TODO
 ]
 
 DefaultType = "DINT"
--- a/plcopen/structures.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/plcopen/structures.py	Mon Aug 21 21:55:18 2017 +0300
@@ -77,9 +77,9 @@
                [GetBlockInfos(pous) for pous in lib.getpous()]}
               for libname, lib in StdBlckLibs.iteritems()]
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                             Test identifier
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 IDENTIFIER_MODEL = re.compile(
     "(?:%(letter)s|_(?:%(letter)s|%(digit)s))(?:_?(?:%(letter)s|%(digit)s))*$" %
@@ -92,9 +92,9 @@
     """
     return IDENTIFIER_MODEL.match(identifier) is not None
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                        Standard functions list generation
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def csv_file_to_table(file):
@@ -285,9 +285,9 @@
         BlkLst = StdBlckDct.setdefault(desc["name"], [])
         BlkLst.append((section["name"], desc))
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Languages Keywords
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 # Keywords for Pou Declaration
 POU_BLOCK_START_KEYWORDS = ["FUNCTION", "FUNCTION_BLOCK", "PROGRAM"]
--- a/py_ext/PythonEditor.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/py_ext/PythonEditor.py	Mon Aug 21 21:55:18 2017 +0300
@@ -72,9 +72,9 @@
         self.StyleSetSpec(stc.STC_P_IDENTIFIER, 'fore:#000000,size:%(size)d' % faces)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                          CFileEditor Main Frame Class
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 class PythonEditor(CodeFileEditor):
 
--- a/runtime/NevowServer.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/runtime/NevowServer.py	Mon Aug 21 21:55:18 2017 +0300
@@ -175,8 +175,8 @@
 
     def disconnected(self, reason):
         self.MainPage.resetHMI()
-        #print reason
-        #print "We will be called back when the client disconnects"
+        # print reason
+        # print "We will be called back when the client disconnects"
 
 
 def RegisterWebsite(port):
--- a/runtime/WampClient.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/runtime/WampClient.py	Mon Aug 21 21:55:18 2017 +0300
@@ -22,7 +22,6 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 import sys
-#from twisted.python import log
 from autobahn.twisted import wamp
 from autobahn.twisted.websocket import WampWebSocketClientFactory, connectWS
 from twisted.internet.defer import inlineCallbacks
--- a/svgui/pyjs/build.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/svgui/pyjs/build.py	Mon Aug 21 21:55:18 2017 +0300
@@ -334,12 +334,12 @@
             pd[platform] = name
 
         print appcode
-        #mod_code[platform][app_name] = appcode
+        # mod_code[platform][app_name] = appcode
 
         # platform.Module.cache.js
 
         modules_done = ['pyjslib', 'sys', '_pyjs.js']
-        #modules_to_do = [app_name] + app_translator.library_modules
+        # modules_to_do = [app_name] + app_translator.library_modules
         modules_to_do = [app_name] + app_translator.library_modules
 
         dependencies = {}
@@ -349,13 +349,13 @@
             sublist = add_subdeps(dependencies, d)
             modules_to_do += sublist
         deps = uniquify(deps)
-        #dependencies[app_name] = deps
+        # dependencies[app_name] = deps
 
         modules[platform] = modules_done + modules_to_do
 
         while modules_to_do:
 
-            #print "modules to do", modules_to_do
+            # print "modules to do", modules_to_do
 
             mn = modules_to_do.pop()
             mod_name = pyjs.strip_py(mn)
@@ -389,18 +389,18 @@
             while mod_name in deps:
                 deps.remove(mod_name)
 
-            #print
-            #print
-            #print "modname preadd:", mod_name, deps
-            #print
-            #print
+            # print
+            # print
+            # print "modname preadd:", mod_name, deps
+            # print
+            # print
             for d in deps:
                 sublist = add_subdeps(dependencies, d)
                 modules_to_do += sublist
             modules_to_do += add_subdeps(dependencies, mod_name)
-            #print "modname:", mod_name, deps
+            # print "modname:", mod_name, deps
             deps = uniquify(deps)
-            #print "modname:", mod_name, deps
+            # print "modname:", mod_name, deps
             dependencies[mod_name] = deps
 
         # work out the dependency ordering of the modules
@@ -414,7 +414,7 @@
         early_app_libs_ = early_app_libs[platform]
         app_libs_ = app_libs[platform]
         app_code_ = app_code[platform]
-        #modules_ = filter_mods(app_name, modules[platform])
+        # modules_ = filter_mods(app_name, modules[platform])
         mods = flattenlist(mod_levels[platform])
         mods.reverse()
         modules_ = filter_mods(None, mods)
@@ -488,8 +488,8 @@
         overnames = map(lambda x: "'%s': '%s'" % x, pover[platform].items())
         overnames = "new pyjslib.Dict({\n\t\t%s\n\t})" % ',\n\t\t'.join(overnames)
 
-        #print "platform names", platform, overnames
-        #print pover
+        # print "platform names", platform, overnames
+        # print pover
 
         # now write app.allcache including dependency-ordered list of
         # library modules
@@ -549,8 +549,8 @@
     sd = subdeps(mod_name)
     if len(sd) == 1:
         return []
-    #print "subdeps", mod_name, sd
-    #print "deps", deps
+    # print "subdeps", mod_name, sd
+    # print "deps", deps
     res = []
     for i in range(0, len(sd)-1):
         parent = sd[i]
@@ -560,7 +560,7 @@
         deps[child] = k
         if parent not in res:
             res.append(parent)
-    #print deps
+    # print deps
     return res
 
 
@@ -628,26 +628,26 @@
     if not mod_list:
         return []
 
-    #print mod_list
-    #print deps
+    # print mod_list
+    # print deps
 
     ordered_deps = []
     last_len = -1
     while deps:
         l_deps = len(deps)
-        #print l_deps
+        # print l_deps
         if l_deps == last_len:
             for m, dl in deps.items():
                 for d in dl:
                     if m in deps.get(d, []):
                         raise Exception('Circular Imports found: \n%s %s -> %s %s'
                                         % (m, dl, d, deps[d]))
-            #raise Exception('Could not calculate dependencies: \n%s' % deps)
+            # raise Exception('Could not calculate dependencies: \n%s' % deps)
             break
         last_len = l_deps
-        #print "modlist", mod_list
+        # print "modlist", mod_list
         nodeps = nodeps_list(mod_list, deps)
-        #print "nodeps", nodeps
+        # print "nodeps", nodeps
         mod_list = filter(lambda x: x not in nodeps, mod_list)
         newdeps = {}
         for k in deps.keys():
@@ -655,10 +655,10 @@
             depslist = filter(lambda x: x not in nodeps, depslist)
             if depslist:
                 newdeps[k] = depslist
-        #print "newdeps", newdeps
+        # print "newdeps", newdeps
         deps = newdeps
         ordered_deps.append(nodeps)
-        #time.sleep(0)
+        # time.sleep(0)
 
     if mod_list:
         ordered_deps.append(mod_list)  # last dependencies - usually the app(s)
--- a/svgui/pyjs/pyjs.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/svgui/pyjs/pyjs.py	Mon Aug 21 21:55:18 2017 +0300
@@ -182,7 +182,7 @@
 
 
 def gen_mod_import(parentName, importName, dynamic=1):
-    #pyjs_ajax_eval("%(n)s.cache.js", null, true);
+    # pyjs_ajax_eval("%(n)s.cache.js", null, true);
     return """
     pyjslib.import_module(sys.loadpath, '%(p)s', '%(n)s', %(d)d, false);
     """ % ({'p': parentName, 'd': dynamic, 'n': importName}) + \
@@ -322,11 +322,11 @@
                 raise TranslationError("unsupported type (in __init__)", child)
 
         # Initialize all classes for this module
-        #print >> self.output, "__"+self.modpfx()+\
+        # print >> self.output, "__"+self.modpfx()+\
         #          "classes_initialize = function() {\n"
-        #for className in self.top_level_classes:
+        # for className in self.top_level_classes:
         #    print >> self.output, "\t"+UU+self.modpfx()+"__"+className+"_initialize();"
-        #print >> self.output, "};\n"
+        # print >> self.output, "};\n"
 
         print >> self.output, "return this;\n"
         print >> self.output, "}; /* end %s */ \n" % module_name
@@ -407,7 +407,7 @@
                 print >>self.output, "        %s=__kwargs.%s;" % (default_name, default_name)
                 default_pos += 1
 
-            #self._default_args_handler(node, arg_names, current_klass)
+            # self._default_args_handler(node, arg_names, current_klass)
             if node.kwargs:
                 arg_names += ["pyjslib.Dict(__kwargs)"]
             print >>self.output, "    var __r = "+"".join(["[", ", ".join(arg_names), "]"])+";"
@@ -594,7 +594,7 @@
         for stmt in node.handlers[0][2]:
             self._stmt(stmt, current_klass)
         if expr:
-            #print >> self.output, "} else { throw(%s); } " % errName
+            # print >> self.output, "} else { throw(%s); } " % errName
             print >> self.output, "}"
         if node.else_ is not None:
             print >>self.output, "    } finally {"
@@ -612,9 +612,9 @@
                 # XXX TODO: distinguish between module import classes
                 # and variables.  right now, this is a hack to get
                 # the sys module working.
-                #if v.expr.name == 'sys':
+                # if v.expr.name == 'sys':
                 return v.expr.name+'.'+attr_name
-                #return v.expr.name+'.__'+attr_name+'.prototype.__class__'
+                # return v.expr.name+'.__'+attr_name+'.prototype.__class__'
             if not use_getattr or attr_name == '__class__' or \
                     attr_name == '__name__':
                 return obj + "." + attr_name
@@ -697,8 +697,8 @@
         if obj in self.method_imported_globals:
             call_name = UU+self.modpfx() + obj + "." + attr_name
         elif obj in self.imported_classes:
-            #attr_str = ""
-            #if attr_name != "__init__":
+            # attr_str = ""
+            # if attr_name != "__init__":
             attr_str = ".prototype.__class__." + attr_name
             call_name = UU+self.imported_classes[obj] + '.__' + obj + attr_str
         elif obj in self.module_imports():
@@ -787,13 +787,13 @@
 
         print >>self.output, UU+class_name_ + " = function () {"
         # call superconstructor
-        #if base_class:
+        # if base_class:
         #    print >>self.output, "    __" + base_class + ".call(this);"
         print >>self.output, "}"
 
         if not init_method:
             init_method = ast.Function([], "__init__", ["self"], [], 0, None, [])
-            #self._method(init_method, current_klass, class_name)
+            # self._method(init_method, current_klass, class_name)
 
         # Generate a function which constructs the object
         clsfunc = ast.Function(
@@ -882,7 +882,7 @@
                 raise TranslationError("methods must take an argument 'self' (in _method)", node)
             self.method_self = arg_names[0]
 
-            #if not classmethod and arg_names[0] != "self":
+            # if not classmethod and arg_names[0] != "self":
             #    raise TranslationError("first arg not 'self' (in _method)", node)
 
         normal_arg_names = arg_names[1:]
@@ -1700,8 +1700,8 @@
         for module in t.imported_modules:
             if module not in self.library_modules:
                 self.library_modules.append(module)
-                #imported_js.update(set(t.imported_js))
-                #imported_modules_str += self._translate(
+                # imported_js.update(set(t.imported_js))
+                # imported_modules_str += self._translate(
                 #    module, False, debug=debug, imported_js=imported_js)
 
         return imported_modules_str + module_str
--- a/targets/__init__.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/targets/__init__.py	Mon Aug 21 21:55:18 2017 +0300
@@ -24,7 +24,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 # Package initialisation
-#import targets
+
 
 """
 Beremiz Targets
--- a/targets/toolchain_makefile.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/targets/toolchain_makefile.py	Mon Aug 21 21:55:18 2017 +0300
@@ -77,7 +77,7 @@
             if res is not None:
                 depfn = res.groups()[0]
                 if os.path.exists(os.path.join(self.buildpath, depfn)):
-                    #print bn + " depends on "+depfn
+                    # print bn + " depends on "+depfn
                     deps.append(depfn)
         # recurse through deps
         # TODO detect cicular deps.
--- a/util/BitmapLibrary.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/util/BitmapLibrary.py	Mon Aug 21 21:55:18 2017 +0300
@@ -26,16 +26,16 @@
 
 import wx
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                            Library Structures
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 BitmapLibrary = {}
 BitmapFolders = []
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                             Library Helpers
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def AddBitmapFolder(path):
--- a/util/Zeroconf.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/util/Zeroconf.py	Mon Aug 21 21:55:18 2017 +0300
@@ -573,8 +573,8 @@
                 # so this is left for debugging.  New types
                 # encountered need to be parsed properly.
                 #
-                #print "UNKNOWN TYPE = " + str(info[0])
-                #raise BadTypeInNameException
+                # print "UNKNOWN TYPE = " + str(info[0])
+                # raise BadTypeInNameException
                 pass
 
             if rec is not None:
@@ -1539,7 +1539,7 @@
     def send(self, out, addr=_MDNS_ADDR, port=_MDNS_PORT):
         """Sends an outgoing packet."""
         # This is a quick test to see if we can parse the packets we generate
-        #temp = DNSIncoming(out.packet())
+        # temp = DNSIncoming(out.packet())
         try:
             bytes_sent = self.socket.sendto(out.packet(), 0, (addr, port))
         except Exception:
--- a/xmlclass/xmlclass.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/xmlclass/xmlclass.py	Mon Aug 21 21:55:18 2017 +0300
@@ -700,9 +700,9 @@
         "initial": GetContentInitial,
     }
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Structure extraction functions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 def DecomposeQualifiedName(name):
--- a/xmlclass/xsdschema.py	Sat Aug 19 21:06:54 2017 +0300
+++ b/xmlclass/xsdschema.py	Mon Aug 21 21:55:18 2017 +0300
@@ -79,9 +79,9 @@
               "fractionDigits", "length", "minLength", "maxLength"]
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           Structure reducing functions
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 # Documentation elements
@@ -803,7 +803,7 @@
         elif child["type"] == "sequence":
             child["minOccurs"] = child["maxOccurs"] = 1
             choices.append(child)
-            #raise ValueError("\"sequence\" in \"choice\" is not supported. Create instead a new complex type!")
+            # raise ValueError("\"sequence\" in \"choice\" is not supported. Create instead a new complex type!")
         elif child["type"] == CHOICE:
             choices.extend(child["choices"])
         elif child["type"] == "group":
@@ -1008,9 +1008,10 @@
             return True
     return schema == reference
 
-#-------------------------------------------------------------------------------
+
+# -------------------------------------------------------------------------------
 #                       Base class for XSD schema extraction
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 
 
 class XSDClassFactory(ClassFactory):
@@ -1133,15 +1134,16 @@
     return GenerateParser(XSDClassFactory(minidom.parseString(xsdstring)), xsdstring)
 
 
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
 #                           XSD schema syntax elements
-#-------------------------------------------------------------------------------
+# -------------------------------------------------------------------------------
+
 
 XSD_NAMESPACE = {
 
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
     #                           Syntax elements definition
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
 
     "all": {
         "struct": """
@@ -1917,9 +1919,9 @@
         "reduce": GenerateFacetReducing("whiteSpace", True)
     },
 
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
     #                       Syntax attributes definition
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
 
     "abstract": {
         "type": SYNTAXATTRIBUTE,
@@ -2199,9 +2201,9 @@
         }
     },
 
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
     #                           Simple types definition
-    #-------------------------------------------------------------------------------
+    # -------------------------------------------------------------------------------
 
     "string": {
         "type": SIMPLETYPE,