--- a/BeremizIDE.py Tue Aug 15 22:38:43 2017 +0300
+++ b/BeremizIDE.py Wed Aug 16 11:47:27 2017 +0300
@@ -311,7 +311,7 @@
inspectorID = wx.NewId()
self.Bind(wx.EVT_MENU, self.OnOpenWidgetInspector, id=inspectorID)
- accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL|wx.ACCEL_ALT, ord('I'), inspectorID)]
+ accels = [wx.AcceleratorEntry(wx.ACCEL_CTRL | wx.ACCEL_ALT, ord('I'), inspectorID)]
keyID = wx.NewId()
self.Bind(wx.EVT_MENU, self.SwitchFullScrMode, id=keyID)
@@ -552,7 +552,7 @@
dialog = wx.MessageDialog(self,
_("There are changes, do you want to save?"),
title,
- wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION)
+ wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
answer = dialog.ShowModal()
dialog.Destroy()
if answer == wx.ID_YES:
@@ -1057,7 +1057,7 @@
dialog = wx.MessageDialog(self,
_("Really delete node '%s'?") % confnode.CTNName(),
_("Remove %s node") % confnode.CTNType,
- wx.YES_NO|wx.NO_DEFAULT)
+ wx.YES_NO | wx.NO_DEFAULT)
if dialog.ShowModal() == wx.ID_YES:
confnode.CTNRemove()
del confnode
--- a/Beremiz_service.py Tue Aug 15 22:38:43 2017 +0300
+++ b/Beremiz_service.py Wed Aug 16 11:47:27 2017 +0300
@@ -196,7 +196,7 @@
event(self, function)
def __init__(self, parent, message, caption=_("Please enter text"), defaultValue="",
- style=wx.OK|wx.CANCEL|wx.CENTRE, pos=wx.DefaultPosition):
+ style=wx.OK | wx.CANCEL | wx.CENTRE, pos=wx.DefaultPosition):
wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos)
self.Tests = []
@@ -212,7 +212,7 @@
texts = {"value": value}
for function, message in self.Tests:
if not function(value):
- message = wx.MessageDialog(self, message % texts, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, message % texts, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
return
--- a/IDEFrame.py Tue Aug 15 22:38:43 2017 +0300
+++ b/IDEFrame.py Wed Aug 16 11:47:27 2017 +0300
@@ -95,22 +95,22 @@
# - Item icon filename
# - Item tooltip text
EditorToolBarItems = {
- "FBD": [(True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ "FBD": [(True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARMOTION, "OnMotionTool",
"move", _("Move the view")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCOMMENT, "OnCommentTool",
"add_comment", _("Create a new comment")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARVARIABLE, "OnVariableTool",
"add_variable", _("Create a new variable")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARBLOCK, "OnBlockTool",
"add_block", _("Create a new block")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCONNECTION, "OnConnectionTool",
"add_connection", _("Create a new connection"))],
- "LD": [(True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ "LD": [(True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARMOTION, "OnMotionTool",
"move", _("Move the view")),
(True, FREEDRAWING_MODE,
@@ -125,7 +125,7 @@
(True, FREEDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCOIL, "OnCoilTool",
"add_coil", _("Create a new coil")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCONTACT, "OnContactTool",
"add_contact", _("Create a new contact")),
(False, DRIVENDRAWING_MODE,
@@ -134,34 +134,34 @@
(True, FREEDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARVARIABLE, "OnVariableTool",
"add_variable", _("Create a new variable")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARBLOCK, "OnBlockTool",
"add_block", _("Create a new block")),
(True, FREEDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCONNECTION, "OnConnectionTool",
"add_connection", _("Create a new connection"))],
- "SFC": [(True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ "SFC": [(True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARMOTION, "OnMotionTool",
"move", _("Move the view")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARCOMMENT, "OnCommentTool",
"add_comment", _("Create a new comment")),
- (True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARINITIALSTEP, "OnInitialStepTool",
"add_initial_step", _("Create a new initial step")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARSTEP, "OnStepTool",
"add_step", _("Create a new step")),
(True, FREEDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARTRANSITION, "OnTransitionTool",
"add_transition", _("Create a new transition")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARACTIONBLOCK, "OnActionBlockTool",
"add_action", _("Create a new action block")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARDIVERGENCE, "OnDivergenceTool",
"add_divergence", _("Create a new divergence")),
- (False, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ (False, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARJUMP, "OnJumpTool",
"add_jump", _("Create a new jump")),
(True, FREEDRAWING_MODE,
@@ -181,7 +181,7 @@
"add_contact", _("Create a new contact"))],
"ST": [],
"IL": [],
- "debug": [(True, FREEDRAWING_MODE|DRIVENDRAWING_MODE,
+ "debug": [(True, FREEDRAWING_MODE | DRIVENDRAWING_MODE,
ID_PLCOPENEDITOREDITORTOOLBARMOTION, "OnMotionTool",
"move", _("Move the view"))],
}
@@ -565,9 +565,9 @@
name='ProjectTree', parent=self.ProjectPanel,
pos=wx.Point(0, 0), size=wx.Size(0, 0),
style=wx.SUNKEN_BORDER,
- agwStyle=wx.TR_HAS_BUTTONS|wx.TR_SINGLE|wx.TR_EDIT_LABELS)
+ agwStyle=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.TR_EDIT_LABELS)
self.ProjectTree.SetBackgroundBitmap(GetBitmap("custom_tree_background"),
- wx.ALIGN_RIGHT|wx.ALIGN_BOTTOM)
+ wx.ALIGN_RIGHT | wx.ALIGN_BOTTOM)
add_menu = wx.Menu()
self._init_coll_AddMenu_Items(add_menu)
self.ProjectTree.SetAddMenu(add_menu)
@@ -1012,7 +1012,7 @@
## Function displaying an Error dialog in PLCOpenEditor.
# @param message The message to display.
def ShowErrorMessage(self, message):
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
@@ -1020,7 +1020,7 @@
# @return False if closing cancelled.
def CheckSaveBeforeClosing(self, title=_("Close Project")):
if not self.Controler.ProjectIsSaved():
- dialog = wx.MessageDialog(self, _("There are changes, do you want to save?"), title, wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION)
+ dialog = wx.MessageDialog(self, _("There are changes, do you want to save?"), title, wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
answer = dialog.ShowModal()
dialog.Destroy()
if answer == wx.ID_YES:
@@ -1084,7 +1084,7 @@
preview = wx.PrintPreview(printout, printout2, data)
if preview.Ok():
- preview_frame = wx.PreviewFrame(preview, self, _("Print preview"), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT)
+ preview_frame = wx.PreviewFrame(preview, self, _("Print preview"), style=wx.DEFAULT_FRAME_STYLE | wx.FRAME_FLOAT_ON_PARENT)
preview_frame.Initialize()
@@ -1622,7 +1622,7 @@
message = _("\"%s\" pou already exists!") % new_name
abort = True
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouVariableNames()]:
- messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO|wx.ICON_QUESTION)
+ messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO | wx.ICON_QUESTION)
if messageDialog.ShowModal() == wx.ID_NO:
abort = True
messageDialog.Destroy()
@@ -1663,12 +1663,12 @@
message = _("\"%s\" config already exists!") % new_name
abort = True
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouNames()]:
- messageDialog = wx.MessageDialog(self, _("There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO|wx.ICON_QUESTION)
+ messageDialog = wx.MessageDialog(self, _("There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO | wx.ICON_QUESTION)
if messageDialog.ShowModal() == wx.ID_NO:
abort = True
messageDialog.Destroy()
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouVariableNames()]:
- messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO|wx.ICON_QUESTION)
+ messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO | wx.ICON_QUESTION)
if messageDialog.ShowModal() == wx.ID_NO:
abort = True
messageDialog.Destroy()
@@ -1682,12 +1682,12 @@
message = _("\"%s\" config already exists!") % new_name
abort = True
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouNames()]:
- messageDialog = wx.MessageDialog(self, _("There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO|wx.ICON_QUESTION)
+ messageDialog = wx.MessageDialog(self, _("There is a POU named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO | wx.ICON_QUESTION)
if messageDialog.ShowModal() == wx.ID_NO:
abort = True
messageDialog.Destroy()
elif new_name.upper() in [name.upper() for name in self.Controler.GetProjectPouVariableNames()]:
- messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO|wx.ICON_QUESTION)
+ messageDialog = wx.MessageDialog(self, _("A POU has an element named \"%s\". This could cause a conflict. Do you wish to continue?") % new_name, _("Error"), wx.YES_NO | wx.ICON_QUESTION)
if messageDialog.ShowModal() == wx.ID_NO:
abort = True
messageDialog.Destroy()
@@ -2416,7 +2416,7 @@
dialog = wx.MessageDialog(self,
_("\"%s\" is used by one or more POUs. Do you wish to continue?") % name,
- title, wx.YES_NO|wx.ICON_QUESTION)
+ title, wx.YES_NO | wx.ICON_QUESTION)
answer = dialog.ShowModal()
dialog.Destroy()
return answer == wx.ID_YES
--- a/PLCOpenEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/PLCOpenEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -336,7 +336,7 @@
self.SaveProjectAs()
def OnGenerateProgramMenu(self, event):
- dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), self.Controler.GetProgramFilePath(), _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE|wx.CHANGE_DIR)
+ dialog = wx.FileDialog(self, _("Choose a file"), os.getcwd(), self.Controler.GetProgramFilePath(), _("ST files (*.st)|*.st|All files|*.*"), wx.SAVE | wx.CHANGE_DIR)
if dialog.ShowModal() == wx.ID_OK:
filepath = dialog.GetPath()
message_text = ""
@@ -353,7 +353,7 @@
else:
message_text += _("\"%s\" is not a valid folder!") % os.path.dirname(filepath)
header, icon = _("Error"), wx.ICON_ERROR
- message = wx.MessageDialog(self, message_text, header, wx.OK|icon)
+ message = wx.MessageDialog(self, message_text, header, wx.OK | icon)
message.ShowModal()
message.Destroy()
dialog.Destroy()
@@ -385,7 +385,7 @@
directory, filename = os.path.split(filepath)
else:
directory, filename = os.getcwd(), "%(projectName)s.xml" % self.Controler.GetProjectProperties()
- dialog = wx.FileDialog(self, _("Choose a file"), directory, filename, _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.SAVE|wx.OVERWRITE_PROMPT)
+ dialog = wx.FileDialog(self, _("Choose a file"), directory, filename, _("PLCOpen files (*.xml)|*.xml|All files|*.*"), wx.SAVE | wx.OVERWRITE_PROMPT)
if dialog.ShowModal() == wx.ID_OK:
filepath = dialog.GetPath()
if os.path.isdir(os.path.dirname(filepath)):
@@ -444,7 +444,7 @@
def Display_Error_Dialog(e_value):
- message = wx.MessageDialog(None, str(e_value), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(None, str(e_value), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
--- a/ProjectController.py Tue Aug 15 22:38:43 2017 +0300
+++ b/ProjectController.py Wed Aug 16 11:47:27 2017 +0300
@@ -1264,7 +1264,7 @@
names = editors.keys()
dialog = wx.SingleChoiceDialog(self.AppFrame,
_("Select an editor:"), _("Editor selection"),
- names, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ names, wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
editor_name = names[dialog.GetSelection()]
dialog.Destroy()
@@ -1494,7 +1494,7 @@
self.IECdebug_datas.pop(IECPath)
else:
IECdebug_data[4] = reduce(
- lambda x, y: x|y,
+ lambda x, y: x | y,
IECdebug_data[0].itervalues(),
False)
self.IECdebug_lock.release()
--- a/canfestival/NetworkEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/canfestival/NetworkEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -62,7 +62,7 @@
main_sizer.AddGrowableCol(0)
main_sizer.AddGrowableRow(0)
- main_sizer.AddWindow(self.NetworkNodes, 0, border=5, flag=wx.GROW|wx.ALL)
+ main_sizer.AddWindow(self.NetworkNodes, 0, border=5, flag=wx.GROW | wx.ALL)
self.NetworkEditor.SetSizer(main_sizer)
--- a/canfestival/canfestival.py Tue Aug 15 22:38:43 2017 +0300
+++ b/canfestival/canfestival.py Wed Aug 16 11:47:27 2017 +0300
@@ -170,7 +170,7 @@
os.path.expanduser("~"),
"%s.eds" % self.CTNName(),
_("EDS files (*.eds)|*.eds|All files|*.*"),
- wx.SAVE|wx.OVERWRITE_PROMPT)
+ wx.SAVE | wx.OVERWRITE_PROMPT)
if dialog.ShowModal() == wx.ID_OK:
result = eds_utils.GenerateEDSFile(dialog.GetPath(), self.GetCurrentNodeCopy())
if result:
--- a/controls/CustomTree.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/CustomTree.py Wed Aug 16 11:47:27 2017 +0300
@@ -53,7 +53,7 @@
CT.CustomTreeCtrl.__init__(self, *args, **kwargs)
self.BackgroundBitmap = None
- self.BackgroundAlign = wx.ALIGN_LEFT|wx.ALIGN_TOP
+ self.BackgroundAlign = wx.ALIGN_LEFT | wx.ALIGN_TOP
self.AddMenu = None
self.Enabled = False
--- a/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableGraphicViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -230,7 +230,7 @@
dialog = wx.MessageDialog(self.ParentWindow,
message,
_("Error"),
- wx.OK|wx.ICON_ERROR)
+ wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/controls/DebugVariablePanel/DebugVariablePanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariablePanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -166,7 +166,7 @@
dialog = wx.MessageDialog(self.ParentWindow,
message,
_("Error"),
- wx.OK|wx.ICON_ERROR)
+ wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
@@ -189,7 +189,7 @@
consumers
@param window: Reference to Beremiz frame
"""
- wx.Panel.__init__(self, parent, style=wx.SP_3D|wx.TAB_TRAVERSAL)
+ wx.Panel.__init__(self, parent, style=wx.SP_3D | wx.TAB_TRAVERSAL)
# Save Reference to Beremiz frame
self.ParentWindow = window
@@ -222,7 +222,7 @@
self.GraphicPanels = []
graphics_button_sizer = wx.BoxSizer(wx.HORIZONTAL)
- main_sizer.AddSizer(graphics_button_sizer, border=5, flag=wx.GROW|wx.ALL)
+ main_sizer.AddSizer(graphics_button_sizer, border=5, flag=wx.GROW | wx.ALL)
range_label = wx.StaticText(self, label=_('Range:'))
graphics_button_sizer.AddWindow(range_label, flag=wx.ALIGN_CENTER_VERTICAL)
@@ -230,7 +230,7 @@
self.CanvasRange = wx.ComboBox(self, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnRangeChanged, self.CanvasRange)
graphics_button_sizer.AddWindow(self.CanvasRange, 1,
- border=5, flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL)
+ border=5, flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
self.CanvasRange.Clear()
default_range_idx = 0
@@ -263,21 +263,21 @@
self.OnPositionChanging, self.CanvasPosition)
self.CanvasPosition.Bind(wx.EVT_SCROLL_PAGEDOWN,
self.OnPositionChanging, self.CanvasPosition)
- main_sizer.AddWindow(self.CanvasPosition, border=5, flag=wx.GROW|wx.LEFT|wx.RIGHT|wx.BOTTOM)
+ main_sizer.AddWindow(self.CanvasPosition, border=5, flag=wx.GROW | wx.LEFT | wx.RIGHT | wx.BOTTOM)
self.TickSizer = wx.BoxSizer(wx.HORIZONTAL)
- main_sizer.AddSizer(self.TickSizer, border=5, flag=wx.ALL|wx.GROW)
+ main_sizer.AddSizer(self.TickSizer, border=5, flag=wx.ALL | wx.GROW)
self.TickLabel = wx.StaticText(self)
self.TickSizer.AddWindow(self.TickLabel, border=5, flag=wx.RIGHT)
- self.MaskLabel = wx.TextCtrl(self, style=wx.TE_READONLY|wx.TE_CENTER|wx.NO_BORDER)
- self.TickSizer.AddWindow(self.MaskLabel, 1, border=5, flag=wx.RIGHT|wx.GROW)
+ self.MaskLabel = wx.TextCtrl(self, style=wx.TE_READONLY | wx.TE_CENTER | wx.NO_BORDER)
+ self.TickSizer.AddWindow(self.MaskLabel, 1, border=5, flag=wx.RIGHT | wx.GROW)
self.TickTimeLabel = wx.StaticText(self)
self.TickSizer.AddWindow(self.TickTimeLabel)
- self.GraphicsWindow = wx.ScrolledWindow(self, style=wx.HSCROLL|wx.VSCROLL)
+ self.GraphicsWindow = wx.ScrolledWindow(self, style=wx.HSCROLL | wx.VSCROLL)
self.GraphicsWindow.SetBackgroundColour(wx.WHITE)
self.GraphicsWindow.SetDropTarget(DebugVariableDropTarget(self))
self.GraphicsWindow.Bind(wx.EVT_ERASE_BACKGROUND, self.OnGraphicsWindowEraseBackground)
--- a/controls/DebugVariablePanel/DebugVariableTextViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/DebugVariablePanel/DebugVariableTextViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -135,7 +135,7 @@
dialog = wx.MessageDialog(self.ParentWindow,
message,
_("Error"),
- wx.OK|wx.ICON_ERROR)
+ wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/controls/FolderTree.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/FolderTree.py Wed Aug 16 11:47:27 2017 +0300
@@ -217,7 +217,7 @@
else:
message = wx.MessageDialog(self,
_("File '%s' already exists!") % new_name,
- _("Error"), wx.OK|wx.ICON_ERROR)
+ _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
event.Veto()
--- a/controls/LibraryPanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/LibraryPanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -98,7 +98,7 @@
# Add TextCtrl for function and function block informations
self.Comment = wx.TextCtrl(splitter_window, size=wx.Size(0, 80),
- style=wx.TE_READONLY|wx.TE_MULTILINE)
+ style=wx.TE_READONLY | wx.TE_MULTILINE)
splitter_window.SplitHorizontally(self.Tree, self.Comment, -80)
--- a/controls/LocationCellEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/LocationCellEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -97,7 +97,7 @@
dialog = wx.SingleChoiceDialog(self,
_("Select a variable class:"), _("Variable class"),
[_("Input"), _("Output"), _("Memory")],
- wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
else:
--- a/controls/LogViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/LogViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -289,7 +289,7 @@
class LogViewer(DebugViewer, wx.Panel):
def __init__(self, parent, window):
- wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER)
+ wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL | wx.SUNKEN_BORDER)
DebugViewer.__init__(self, None, False, False)
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5)
@@ -297,7 +297,7 @@
main_sizer.AddGrowableRow(1)
filter_sizer = wx.BoxSizer(wx.HORIZONTAL)
- main_sizer.AddSizer(filter_sizer, border=5, flag=wx.TOP|wx.LEFT|wx.RIGHT|wx.GROW)
+ main_sizer.AddSizer(filter_sizer, border=5, flag=wx.TOP | wx.LEFT | wx.RIGHT | wx.GROW)
self.MessageFilter = wx.ComboBox(self, style=wx.CB_READONLY)
self.MessageFilter.Append(_("All"))
@@ -306,7 +306,7 @@
for level in levels:
self.MessageFilter.Append(_(level))
self.Bind(wx.EVT_COMBOBOX, self.OnMessageFilterChanged, self.MessageFilter)
- filter_sizer.AddWindow(self.MessageFilter, 1, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ filter_sizer.AddWindow(self.MessageFilter, 1, border=5, flag=wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
self.SearchMessage = wx.SearchCtrl(self, style=wx.TE_PROCESS_ENTER)
self.SearchMessage.ShowSearchButton(True)
@@ -316,7 +316,7 @@
self.OnSearchMessageSearchButtonClick, self.SearchMessage)
self.Bind(wx.EVT_SEARCHCTRL_CANCEL_BTN,
self.OnSearchMessageCancelButtonClick, self.SearchMessage)
- filter_sizer.AddWindow(self.SearchMessage, 3, border=5, flag=wx.RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ filter_sizer.AddWindow(self.SearchMessage, 3, border=5, flag=wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
self.CleanButton = wx.lib.buttons.GenBitmapButton(self, bitmap=GetBitmap("Clean"),
size=wx.Size(28, 28), style=wx.NO_BORDER)
@@ -327,7 +327,7 @@
message_panel_sizer = wx.FlexGridSizer(cols=2, hgap=0, rows=1, vgap=0)
message_panel_sizer.AddGrowableCol(0)
message_panel_sizer.AddGrowableRow(0)
- main_sizer.AddSizer(message_panel_sizer, border=5, flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.GROW)
+ main_sizer.AddSizer(message_panel_sizer, border=5, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.GROW)
self.MessagePanel = wx.Panel(self)
if wx.Platform == '__WXMSW__':
--- a/controls/ProjectPropertiesPanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/ProjectPropertiesPanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -52,7 +52,7 @@
st = wx.StaticText(parent, label=label)
sizer.AddWindow(st, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL|border|wx.LEFT)
+ flag=wx.ALIGN_CENTER_VERTICAL | border | wx.LEFT)
tc = wx.TextCtrl(parent, style=wx.TE_PROCESS_ENTER)
setattr(self, name, tc)
@@ -60,7 +60,7 @@
self.Bind(wx.EVT_TEXT_ENTER, callback, tc)
tc.Bind(wx.EVT_KILL_FOCUS, callback)
sizer.AddWindow(tc, border=10,
- flag=wx.GROW|border|wx.RIGHT)
+ flag=wx.GROW | border | wx.RIGHT)
def __init__(self, parent, controller=None, window=None, enable_required=True):
wx.Notebook.__init__(self, parent)
@@ -111,18 +111,18 @@
pageSize_st = wx.StaticText(self.GraphicsPanel,
label=_('Page Size (optional):'))
graphicpanel_sizer.AddWindow(pageSize_st, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.LEFT | wx.RIGHT)
pageSize_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=2, vgap=5)
pageSize_sizer.AddGrowableCol(1)
graphicpanel_sizer.AddSizer(pageSize_sizer, border=10,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
for name, label in [('PageWidth', _('Width:')),
('PageHeight', _('Height:'))]:
st = wx.StaticText(self.GraphicsPanel, label=label)
pageSize_sizer.AddWindow(st, border=12,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.LEFT)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT)
sp = wx.SpinCtrl(self.GraphicsPanel,
min=0, max=2**16, style=wx.TE_PROCESS_ENTER)
@@ -135,11 +135,11 @@
scaling_st = wx.StaticText(self.GraphicsPanel,
label=_('Grid Resolution:'))
graphicpanel_sizer.AddWindow(scaling_st, border=10,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
scaling_nb = wx.Notebook(self.GraphicsPanel)
graphicpanel_sizer.AddWindow(scaling_nb, border=10,
- flag=wx.GROW|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.Scalings = {}
for language, translation in [("FBD", _("FBD")), ("LD", _("LD")), ("SFC", _("SFC"))]:
@@ -158,7 +158,7 @@
st = wx.StaticText(scaling_panel, label=label)
scalingpanel_sizer.AddWindow(st, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL|border|wx.LEFT)
+ flag=wx.ALIGN_CENTER_VERTICAL | border | wx.LEFT)
sp = wx.SpinCtrl(scaling_panel,
min=0, max=2**16, style=wx.TE_PROCESS_ENTER)
@@ -167,7 +167,7 @@
self.Bind(wx.EVT_TEXT_ENTER, callback, sp)
sp.Bind(wx.EVT_KILL_FOCUS, callback)
scalingpanel_sizer.AddWindow(sp, border=10,
- flag=wx.GROW|border|wx.RIGHT)
+ flag=wx.GROW | border | wx.RIGHT)
self.Scalings[language] = scaling_controls
scaling_nb.AddPage(scaling_panel, translation)
@@ -187,27 +187,27 @@
language_label = wx.StaticText(self.MiscellaneousPanel,
label=_('Language (optional):'))
miscellaneouspanel_sizer.AddWindow(language_label, border=10,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP|wx.LEFT)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP | wx.LEFT)
self.Language = wx.ComboBox(self.MiscellaneousPanel,
style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnLanguageChanged, self.Language)
miscellaneouspanel_sizer.AddWindow(self.Language, border=10,
- flag=wx.GROW|wx.TOP|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.RIGHT)
description_label = wx.StaticText(self.MiscellaneousPanel,
label=_('Content Description (optional):'))
miscellaneouspanel_sizer.AddWindow(description_label, border=10,
- flag=wx.BOTTOM|wx.LEFT)
+ flag=wx.BOTTOM | wx.LEFT)
self.ContentDescription = wx.TextCtrl(self.MiscellaneousPanel,
- size=wx.Size(240, 150), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER)
+ size=wx.Size(240, 150), style=wx.TE_MULTILINE | wx.TE_PROCESS_ENTER)
self.Bind(wx.EVT_TEXT_ENTER, self.OnContentDescriptionChanged,
self.ContentDescription)
self.ContentDescription.Bind(wx.EVT_KILL_FOCUS,
self.OnContentDescriptionChanged)
miscellaneouspanel_sizer.AddWindow(self.ContentDescription, border=10,
- flag=wx.GROW|wx.BOTTOM|wx.RIGHT)
+ flag=wx.GROW | wx.BOTTOM | wx.RIGHT)
self.AddPage(self.MiscellaneousPanel, _("Miscellaneous"))
--- a/controls/SearchResultPanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/SearchResultPanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -68,7 +68,7 @@
parent.AddGrowableRow(1)
def _init_coll_HeaderSizer_Items(self, parent):
- parent.AddWindow(self.HeaderLabel, 1, border=5, flag=wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ parent.AddWindow(self.HeaderLabel, 1, border=5, flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
parent.AddWindow(self.ResetButton, 0, border=0, flag=0)
def _init_coll_HeaderSizer_Growables(self, parent):
@@ -93,7 +93,7 @@
name='HeaderLabel', parent=self,
pos=wx.Point(0, 0), size=wx.Size(0, 17), style=0)
- search_results_tree_style = CT.TR_HAS_BUTTONS|CT.TR_NO_LINES|CT.TR_HAS_VARIABLE_ROW_HEIGHT
+ search_results_tree_style = CT.TR_HAS_BUTTONS | CT.TR_NO_LINES | CT.TR_HAS_VARIABLE_ROW_HEIGHT
self.SearchResultsTree = CT.CustomTreeCtrl(id=ID_SEARCHRESULTPANELSEARCHRESULTSTREE,
name="SearchResultsTree", parent=self,
pos=wx.Point(0, 0), style=search_results_tree_style)
@@ -295,7 +295,7 @@
style = wx.TextAttr(wx.Colour(0, 127, 174))
if text is not None:
- text_ctrl_style = wx.BORDER_NONE|wx.TE_READONLY|wx.TE_RICH2
+ text_ctrl_style = wx.BORDER_NONE | wx.TE_READONLY | wx.TE_RICH2
if wx.Platform != '__WXMSW__' or len(text.splitlines()) > 1:
text_ctrl_style |= wx.TE_MULTILINE
text_ctrl = wx.TextCtrl(id=-1, parent=self.SearchResultsTree, pos=wx.Point(0, 0),
--- a/controls/TextCtrlAutoComplete.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/TextCtrlAutoComplete.py Wed Aug 16 11:47:27 2017 +0300
@@ -40,7 +40,7 @@
def __init__(self, parent, choices=[]):
wx.PopupWindow.__init__(self, parent, wx.BORDER_SIMPLE)
- self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL|wx.LB_SINGLE|wx.LB_SORT)
+ self.ListBox = wx.ListBox(self, -1, style=wx.LB_HSCROLL | wx.LB_SINGLE | wx.LB_SORT)
self.SetChoices(choices)
--- a/controls/VariablePanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/controls/VariablePanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -294,7 +294,7 @@
dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
[_("Input"), _("Output"), _("Memory")],
- wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
else:
@@ -354,7 +354,7 @@
dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
[_("Input"), _("Output"), _("Memory")],
- wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
else:
@@ -404,7 +404,7 @@
wx.CallAfter(self.ShowMessage, message)
def ShowMessage(self, message):
- message = wx.MessageDialog(self.ParentWindow, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self.ParentWindow, message, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
@@ -425,7 +425,7 @@
controls_sizer = wx.FlexGridSizer(cols=10, hgap=5, rows=1, vgap=5)
controls_sizer.AddGrowableCol(5)
controls_sizer.AddGrowableRow(0)
- self.MainSizer.AddSizer(controls_sizer, border=5, flag=wx.GROW|wx.ALL)
+ self.MainSizer.AddSizer(controls_sizer, border=5, flag=wx.GROW | wx.ALL)
self.ReturnTypeLabel = wx.StaticText(self, label=_('Return Type:'))
controls_sizer.AddWindow(self.ReturnTypeLabel, flag=wx.ALIGN_CENTER_VERTICAL)
@@ -762,7 +762,7 @@
self.ClassList = [self.Filter]
def ShowErrorMessage(self, message):
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/dialogs/ActionBlockDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/ActionBlockDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -132,7 +132,7 @@
top_sizer.AddGrowableCol(0)
top_sizer.AddGrowableRow(0)
main_sizer.AddSizer(top_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
actions_label = wx.StaticText(self, label=_('Actions:'))
top_sizer.AddWindow(actions_label, flag=wx.ALIGN_BOTTOM)
@@ -154,12 +154,12 @@
self.ActionsGrid.Bind(wx.grid.EVT_GRID_CELL_CHANGE,
self.OnActionsGridCellChange)
main_sizer.AddSizer(self.ActionsGrid, border=20,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
-
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
+
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
main_sizer.AddSizer(button_sizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
--- a/dialogs/ArrayTypeDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/ArrayTypeDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -50,7 +50,7 @@
top_sizer = wx.BoxSizer(wx.HORIZONTAL)
main_sizer.AddSizer(top_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
basetype_label = wx.StaticText(self, label=_('Base Type:'))
top_sizer.AddWindow(basetype_label, 1, flag=wx.ALIGN_BOTTOM)
@@ -69,12 +69,12 @@
"_OnDownButton"]:
setattr(self.Dimensions, func, self.OnDimensionsChanged)
main_sizer.AddSizer(self.Dimensions, border=20,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
main_sizer.AddSizer(button_sizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
@@ -109,7 +109,7 @@
dimensions_list.append(bounds)
if message is not None:
- dlg = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dlg = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dlg.ShowModal()
dlg.Destroy()
return None
--- a/dialogs/BlockPreviewDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/BlockPreviewDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -71,7 +71,7 @@
self.Preview.Bind(wx.EVT_PAINT, self.OnPaint)
# Add default dialog buttons sizer
- self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK,
self.ButtonSizer.GetAffirmativeButton())
@@ -117,7 +117,7 @@
# Create a sizer for dividing parameters in two columns
self.ColumnSizer = wx.BoxSizer(wx.HORIZONTAL)
self.MainSizer.AddSizer(self.ColumnSizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
# Create a sizer for left column
self.LeftGridSizer = wx.FlexGridSizer(cols=1, hgap=0,
@@ -126,7 +126,7 @@
if left_growable_row is not None:
self.LeftGridSizer.AddGrowableRow(left_growable_row)
self.ColumnSizer.AddSizer(self.LeftGridSizer, 1, border=5,
- flag=wx.GROW|wx.RIGHT|wx.EXPAND)
+ flag=wx.GROW | wx.RIGHT | wx.EXPAND)
# Create a sizer for right column
self.RightGridSizer = wx.FlexGridSizer(cols=1, hgap=0,
@@ -135,7 +135,7 @@
if right_growable_row is not None:
self.RightGridSizer.AddGrowableRow(right_growable_row)
self.ColumnSizer.AddSizer(self.RightGridSizer, 1, border=5,
- flag=wx.GROW|wx.LEFT)
+ flag=wx.GROW | wx.LEFT)
self.SetSizer(self.MainSizer)
@@ -235,7 +235,7 @@
"""
dialog = wx.MessageDialog(self, message,
_("Error"),
- wx.OK|wx.ICON_ERROR)
+ wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/dialogs/BrowseLocationsDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/BrowseLocationsDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -66,7 +66,7 @@
def __init__(self, parent, var_type, controller):
wx.Dialog.__init__(self, parent, title=_('Browse Locations'),
- style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER)
+ style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)
main_sizer.AddGrowableCol(0)
@@ -74,22 +74,22 @@
locations_label = wx.StaticText(self, label=_('Locations available:'))
main_sizer.AddWindow(locations_label, border=20,
- flag=wx.TOP|wx.LEFT|wx.RIGHT|wx.GROW)
+ flag=wx.TOP | wx.LEFT | wx.RIGHT | wx.GROW)
self.LocationsTree = wx.TreeCtrl(self,
- style=wx.TR_HAS_BUTTONS|wx.TR_SINGLE|wx.SUNKEN_BORDER|wx.TR_HIDE_ROOT|wx.TR_LINES_AT_ROOT)
+ style=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.SUNKEN_BORDER | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT)
self.LocationsTree.SetInitialSize(wx.Size(-1, 300))
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnLocationsTreeItemActivated,
self.LocationsTree)
main_sizer.AddWindow(self.LocationsTree, border=20,
- flag=wx.LEFT|wx.RIGHT|wx.GROW)
+ flag=wx.LEFT | wx.RIGHT | wx.GROW)
button_gridsizer = wx.FlexGridSizer(cols=5, hgap=5, rows=1, vgap=0)
button_gridsizer.AddGrowableCol(1)
button_gridsizer.AddGrowableCol(3)
button_gridsizer.AddGrowableRow(0)
main_sizer.AddSizer(button_gridsizer, border=20,
- flag=wx.BOTTOM|wx.LEFT|wx.RIGHT|wx.GROW)
+ flag=wx.BOTTOM | wx.LEFT | wx.RIGHT | wx.GROW)
direction_label = wx.StaticText(self, label=_('Direction:'))
button_gridsizer.AddWindow(direction_label,
@@ -98,7 +98,7 @@
self.DirFilterChoice = wx.ComboBox(self, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnFilterChoice, self.DirFilterChoice)
button_gridsizer.AddWindow(self.DirFilterChoice,
- flag=wx.GROW|wx.ALIGN_CENTER_VERTICAL)
+ flag=wx.GROW | wx.ALIGN_CENTER_VERTICAL)
filter_label = wx.StaticText(self, label=_('Type:'))
button_gridsizer.AddWindow(filter_label,
@@ -107,9 +107,9 @@
self.TypeFilterChoice = wx.ComboBox(self, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnFilterChoice, self.TypeFilterChoice)
button_gridsizer.AddWindow(self.TypeFilterChoice,
- flag=wx.GROW|wx.ALIGN_CENTER_VERTICAL)
-
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ flag=wx.GROW | wx.ALIGN_CENTER_VERTICAL)
+
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
button_gridsizer.AddSizer(button_sizer, flag=wx.ALIGN_RIGHT)
@@ -218,7 +218,7 @@
if selected.IsOk():
var_infos = self.LocationsTree.GetPyData(selected)
if var_infos is None or var_infos["type"] in [LOCATION_CONFNODE, LOCATION_MODULE, LOCATION_GROUP]:
- dialog = wx.MessageDialog(self, _("A location must be selected!"), _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, _("A location must be selected!"), _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/BrowseValuesLibraryDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/BrowseValuesLibraryDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -34,7 +34,7 @@
def __init__(self, parent, name, library, default=None):
wx.Dialog.__init__(self,
name='BrowseValueDialog', parent=parent,
- style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER,
+ style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER,
title=_('Browse %s values library') % name)
self.staticText1 = wx.StaticText(
@@ -43,17 +43,17 @@
self.ValuesLibrary = wx.TreeCtrl(
name='ValuesLibrary', parent=self, pos=wx.Point(0, 0),
- size=wx.Size(400, 200), style=wx.TR_HAS_BUTTONS|wx.TR_SINGLE|wx.SUNKEN_BORDER|wx.TR_HIDE_ROOT|wx.TR_LINES_AT_ROOT)
+ size=wx.Size(400, 200), style=wx.TR_HAS_BUTTONS | wx.TR_SINGLE | wx.SUNKEN_BORDER | wx.TR_HIDE_ROOT | wx.TR_LINES_AT_ROOT)
- self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, id=self.ButtonSizer.GetAffirmativeButton().GetId())
self.flexGridSizer1 = wx.FlexGridSizer(cols=1, hgap=0, rows=3, vgap=10)
- self.flexGridSizer1.AddWindow(self.staticText1, 0, border=20, flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
- self.flexGridSizer1.AddWindow(self.ValuesLibrary, 0, border=20, flag=wx.GROW|wx.LEFT|wx.RIGHT)
- self.flexGridSizer1.AddSizer(self.ButtonSizer, 0, border=20, flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ self.flexGridSizer1.AddWindow(self.staticText1, 0, border=20, flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
+ self.flexGridSizer1.AddWindow(self.ValuesLibrary, 0, border=20, flag=wx.GROW | wx.LEFT | wx.RIGHT)
+ self.flexGridSizer1.AddSizer(self.ButtonSizer, 0, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.flexGridSizer1.AddGrowableCol(0)
self.flexGridSizer1.AddGrowableRow(1)
@@ -80,7 +80,7 @@
def OnOK(self, event):
selected = self.ValuesLibrary.GetSelection()
if not selected.IsOk() or self.ValuesLibrary.GetPyData(selected) is None:
- message = wx.MessageDialog(self, _("No valid value selected!"), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("No valid value selected!"), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
else:
--- a/dialogs/ConnectionDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/ConnectionDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -89,7 +89,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.ColumnSizer.RemoveSizer(self.RightGridSizer)
# Add button for applying connection name modification to all connection
--- a/dialogs/DiscoveryDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/DiscoveryDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -48,9 +48,9 @@
class DiscoveryDialog(wx.Dialog, listmix.ColumnSorterMixin):
def _init_coll_MainSizer_Items(self, parent):
- parent.AddWindow(self.staticText1, 0, border=20, flag=wx.TOP|wx.LEFT|wx.RIGHT|wx.GROW)
- parent.AddWindow(self.ServicesList, 0, border=20, flag=wx.LEFT|wx.RIGHT|wx.GROW)
- parent.AddSizer(self.ButtonGridSizer, 0, border=20, flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.GROW)
+ parent.AddWindow(self.staticText1, 0, border=20, flag=wx.TOP | wx.LEFT | wx.RIGHT | wx.GROW)
+ parent.AddWindow(self.ServicesList, 0, border=20, flag=wx.LEFT | wx.RIGHT | wx.GROW)
+ parent.AddSizer(self.ButtonGridSizer, 0, border=20, flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.GROW)
def _init_coll_MainSizer_Growables(self, parent):
parent.AddGrowableCol(0)
@@ -90,7 +90,7 @@
# Set up list control
self.ServicesList = AutoWidthListCtrl(id=ID_DISCOVERYDIALOGSERVICESLIST,
name='ServicesList', parent=self, pos=wx.Point(0, 0), size=wx.Size(0, 0),
- style=wx.LC_REPORT|wx.LC_EDIT_LABELS|wx.LC_SORT_ASCENDING|wx.LC_SINGLE_SEL)
+ style=wx.LC_REPORT | wx.LC_EDIT_LABELS | wx.LC_SORT_ASCENDING | wx.LC_SINGLE_SEL)
self.ServicesList.InsertColumn(0, _('NAME'))
self.ServicesList.InsertColumn(1, _('TYPE'))
self.ServicesList.InsertColumn(2, _('IP'))
@@ -120,7 +120,7 @@
pos=wx.Point(0, 0), size=wx.DefaultSize, style=0)
self.Bind(wx.EVT_BUTTON, self.OnIpButton, id=ID_DISCOVERYDIALOGIPBUTTON)
- self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTER)
+ self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTER)
self._init_sizers()
self.Fit()
--- a/dialogs/DurationEditorDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/DurationEditorDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -65,7 +65,7 @@
controls_sizer = wx.FlexGridSizer(cols=len(CONTROLS), hgap=10, rows=2, vgap=10)
main_sizer.AddSizer(controls_sizer, border=20,
- flag=wx.TOP|wx.LEFT|wx.RIGHT|wx.GROW)
+ flag=wx.TOP | wx.LEFT | wx.RIGHT | wx.GROW)
controls = []
for i, (name, label) in enumerate(CONTROLS):
@@ -86,10 +86,10 @@
for st, txtctrl in controls:
controls_sizer.AddWindow(txtctrl, flag=wx.GROW)
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
main_sizer.AddSizer(button_sizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
self.Fit()
@@ -119,7 +119,7 @@
try:
value = float(control.GetValue())
except ValueError, e:
- message = wx.MessageDialog(self, _("Invalid value!\nYou must fill a numeric value."), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("Invalid value!\nYou must fill a numeric value."), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
event.Skip()
@@ -165,7 +165,7 @@
message = _("Field %s hasn't a valid value!") % errors[0]
else:
message = _("Fields %s haven't a valid value!") % ",".join(errors)
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/FBDBlockDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/FBDBlockDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -76,7 +76,7 @@
setattr(self.LibraryPanel, "_OnTreeItemSelected",
self.OnLibraryTreeItemSelected)
left_staticboxsizer.AddWindow(self.LibraryPanel, 1, border=5,
- flag=wx.GROW|wx.TOP)
+ flag=wx.GROW | wx.TOP)
# Create sizer for other block parameters
top_right_gridsizer = wx.FlexGridSizer(cols=2, hgap=0, rows=4, vgap=5)
@@ -134,7 +134,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
# Dictionary containing correspondence between parameter exchanged and
# control to fill with parameter value
--- a/dialogs/FBDVariableDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/FBDVariableDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -92,7 +92,7 @@
# Create label for variable expression
name_label = wx.StaticText(self, label=_('Expression:'))
self.RightGridSizer.AddWindow(name_label, border=5,
- flag=wx.GROW|wx.BOTTOM)
+ flag=wx.GROW | wx.BOTTOM)
# Create text control for defining variable expression
self.Expression = wx.TextCtrl(self)
@@ -102,19 +102,19 @@
# Create a list box to selected variable expression in the list of
# variables defined in POU
self.VariableName = wx.ListBox(self, size=wx.Size(-1, 120),
- style=wx.LB_SINGLE|wx.LB_SORT)
+ style=wx.LB_SINGLE | wx.LB_SORT)
self.Bind(wx.EVT_LISTBOX, self.OnNameChanged, self.VariableName)
- self.RightGridSizer.AddWindow(self.VariableName, border=4, flag=wx.GROW|wx.TOP)
+ self.RightGridSizer.AddWindow(self.VariableName, border=4, flag=wx.GROW | wx.TOP)
# Add preview panel and associated label to sizers
self.MainSizer.AddWindow(self.PreviewLabel, border=20,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
self.MainSizer.AddWindow(self.Preview, border=20,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
# Set options that can be selected in class combo box
for var_class, choice in VARIABLE_CLASSES_DICT.iteritems():
--- a/dialogs/FindInPouDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/FindInPouDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -35,7 +35,7 @@
def __init__(self, parent):
wx.Dialog.__init__(self, parent, title=_("Find"),
- style=wx.CAPTION|wx.CLOSE_BOX|wx.CLIP_CHILDREN|wx.RESIZE_BORDER)
+ style=wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN | wx.RESIZE_BORDER)
self._init_icon(parent)
panel = wx.Panel(self, style=wx.TAB_TRAVERSAL)
@@ -46,11 +46,11 @@
controls_sizer = wx.BoxSizer(wx.VERTICAL)
main_sizer.AddSizer(controls_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
patterns_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=1, vgap=5)
patterns_sizer.AddGrowableCol(1)
- controls_sizer.AddSizer(patterns_sizer, border=5, flag=wx.GROW|wx.BOTTOM)
+ controls_sizer.AddSizer(patterns_sizer, border=5, flag=wx.GROW | wx.BOTTOM)
find_label = wx.StaticText(panel, label=_("Find:"))
patterns_sizer.AddWindow(find_label, flag=wx.ALIGN_CENTER_VERTICAL)
@@ -61,22 +61,22 @@
patterns_sizer.AddWindow(self.FindPattern, flag=wx.GROW)
params_sizer = wx.BoxSizer(wx.HORIZONTAL)
- controls_sizer.AddSizer(params_sizer, border=5, flag=wx.GROW|wx.BOTTOM)
+ controls_sizer.AddSizer(params_sizer, border=5, flag=wx.GROW | wx.BOTTOM)
direction_staticbox = wx.StaticBox(panel, label=_("Direction"))
direction_staticboxsizer = wx.StaticBoxSizer(
direction_staticbox, wx.VERTICAL)
params_sizer.AddSizer(direction_staticboxsizer, 1, border=5,
- flag=wx.GROW|wx.RIGHT)
+ flag=wx.GROW | wx.RIGHT)
self.Forward = wx.RadioButton(panel, label=_("Forward"),
style=wx.RB_GROUP)
direction_staticboxsizer.AddWindow(self.Forward, border=5,
- flag=wx.ALL|wx.GROW)
+ flag=wx.ALL | wx.GROW)
self.Backward = wx.RadioButton(panel, label=_("Backward"))
direction_staticboxsizer.AddWindow(self.Backward, border=5,
- flag=wx.ALL|wx.GROW)
+ flag=wx.ALL | wx.GROW)
options_staticbox = wx.StaticBox(panel, label=_("Options"))
options_staticboxsizer = wx.StaticBoxSizer(
@@ -86,20 +86,20 @@
self.CaseSensitive = wx.CheckBox(panel, label=_("Case sensitive"))
self.CaseSensitive.SetValue(True)
options_staticboxsizer.AddWindow(self.CaseSensitive, border=5,
- flag=wx.ALL|wx.GROW)
+ flag=wx.ALL | wx.GROW)
self.WrapSearch = wx.CheckBox(panel, label=_("Wrap search"))
self.WrapSearch.SetValue(True)
options_staticboxsizer.AddWindow(self.WrapSearch, border=5,
- flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.GROW)
+ flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.GROW)
self.RegularExpressions = wx.CheckBox(panel, label=_("Regular expressions"))
options_staticboxsizer.AddWindow(self.RegularExpressions, border=5,
- flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.GROW)
+ flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.GROW)
buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
main_sizer.AddSizer(buttons_sizer, border=20,
- flag=wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.ALIGN_RIGHT)
+ flag=wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.ALIGN_RIGHT)
self.FindButton = wx.Button(panel, label=_("Find"))
self.FindButton.SetDefault()
--- a/dialogs/ForceVariableDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/ForceVariableDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -168,7 +168,7 @@
def __init__(self, parent, iec_type, defaultValue=""):
wx.TextEntryDialog.__init__(self, parent, message=_("Forcing Variable Value"),
caption=_("Please enter value for a \"%s\" variable:") % iec_type, defaultValue=defaultValue,
- style=wx.OK|wx.CANCEL|wx.CENTRE, pos=wx.DefaultPosition)
+ style=wx.OK | wx.CANCEL | wx.CENTRE, pos=wx.DefaultPosition)
self.IEC_Type = iec_type
@@ -184,7 +184,7 @@
border = self.GetSizer().GetItem(1).GetBorder()
self.GetSizer().Insert(before=2, item=self.ToggleButton,
border=border,
- flag=wx.LEFT|wx.RIGHT|wx.EXPAND)
+ flag=wx.LEFT | wx.RIGHT | wx.EXPAND)
self.Bind(wx.EVT_TOGGLEBUTTON, self.ToggleBoolValue, self.ToggleButton)
self.Fit()
@@ -201,7 +201,7 @@
elif GetTypeValue[self.IEC_Type](value) is None:
message = _("Invalid value \"{a1}\" for \"{a2}\" variable!").format(a1=value, a2=self.IEC_Type)
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/LDElementDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/LDElementDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -62,7 +62,7 @@
# Create label for LD element modifier
modifier_label = wx.StaticText(self, label=_('Modifier:'))
self.LeftGridSizer.AddWindow(modifier_label, border=5,
- flag=wx.GROW|wx.BOTTOM)
+ flag=wx.GROW | wx.BOTTOM)
# Create radio buttons for selecting LD element modifier
self.ModifierRadioButtons = {}
@@ -88,7 +88,7 @@
# Create label for LD element variable
element_variable_label = wx.StaticText(self, label=_('Variable:'))
self.LeftGridSizer.AddWindow(element_variable_label, border=5,
- flag=wx.GROW|wx.TOP)
+ flag=wx.GROW | wx.TOP)
# Create a combo box for defining LD element variable
self.ElementVariable = wx.ComboBox(self, style=wx.CB_SORT)
@@ -97,7 +97,7 @@
self.Bind(wx.EVT_TEXT, self.OnVariableChanged,
self.ElementVariable)
self.LeftGridSizer.AddWindow(self.ElementVariable, border=5,
- flag=wx.GROW|wx.TOP)
+ flag=wx.GROW | wx.TOP)
# Add preview panel and associated label to sizers
self.RightGridSizer.AddWindow(self.PreviewLabel, flag=wx.GROW)
@@ -105,7 +105,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
# Save LD element class
self.ElementClass = (LD_Contact if type == "contact" else LD_Coil)
--- a/dialogs/LDPowerRailDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/LDPowerRailDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -86,7 +86,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.Fit()
# Left Power Rail radio button is default control having keyboard focus
--- a/dialogs/PouActionDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/PouActionDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -46,27 +46,27 @@
infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=15)
infos_sizer.AddGrowableCol(1)
main_sizer.AddSizer(infos_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
actionname_label = wx.StaticText(self, label=_('Action Name:'))
infos_sizer.AddWindow(actionname_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.ActionName = wx.TextCtrl(self, size=wx.Size(180, -1))
infos_sizer.AddWindow(self.ActionName, flag=wx.GROW)
language_label = wx.StaticText(self, label=_('Language:'))
infos_sizer.AddWindow(language_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
infos_sizer.AddWindow(self.Language, flag=wx.GROW)
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK,
button_sizer.GetAffirmativeButton())
main_sizer.AddSizer(button_sizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
@@ -104,7 +104,7 @@
elif action_name.upper() in self.PouElementNames:
message = _("\"%s\" element for this pou already exists!") % action_name
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/PouDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/PouDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -56,18 +56,18 @@
infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=15)
infos_sizer.AddGrowableCol(1)
main_sizer.AddSizer(infos_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
pouname_label = wx.StaticText(self, label=_('POU Name:'))
infos_sizer.AddWindow(pouname_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.PouName = wx.TextCtrl(self)
infos_sizer.AddWindow(self.PouName, flag=wx.GROW)
poutype_label = wx.StaticText(self, label=_('POU Type:'))
infos_sizer.AddWindow(poutype_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.PouType = wx.ComboBox(self, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnTypeChanged, self.PouType)
@@ -75,15 +75,15 @@
language_label = wx.StaticText(self, label=_('Language:'))
infos_sizer.AddWindow(language_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
infos_sizer.AddWindow(self.Language, flag=wx.GROW)
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
main_sizer.AddSizer(button_sizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
@@ -129,13 +129,13 @@
question = True
if message is not None:
if question:
- dialog = wx.MessageDialog(self, message, _("Warning"), wx.YES_NO|wx.ICON_EXCLAMATION)
+ dialog = wx.MessageDialog(self, message, _("Warning"), wx.YES_NO | wx.ICON_EXCLAMATION)
result = dialog.ShowModal()
dialog.Destroy()
if result == wx.ID_YES:
self.EndModal(wx.ID_OK)
else:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/PouNameDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/PouNameDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -32,7 +32,7 @@
class PouNameDialog(wx.TextEntryDialog):
def __init__(self, parent, message, caption="Please enter text", defaultValue="",
- style=wx.OK|wx.CANCEL|wx.CENTRE, pos=wx.DefaultPosition):
+ style=wx.OK | wx.CANCEL | wx.CENTRE, pos=wx.DefaultPosition):
wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos)
self.PouNames = []
@@ -52,7 +52,7 @@
elif step_name.upper() in self.PouNames:
message = _("A POU named \"%s\" already exists!") % step_name
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/PouTransitionDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/PouTransitionDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -50,25 +50,25 @@
infos_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=3, vgap=10)
infos_sizer.AddGrowableCol(1)
main_sizer.AddSizer(infos_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
transitionname_label = wx.StaticText(self, label=_('Transition Name:'))
infos_sizer.AddWindow(transitionname_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.TransitionName = wx.TextCtrl(self, size=wx.Size(180, -1))
infos_sizer.AddWindow(self.TransitionName, flag=wx.GROW)
language_label = wx.StaticText(self, label=_('Language:'))
infos_sizer.AddWindow(language_label, border=4,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.TOP)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.TOP)
self.Language = wx.ComboBox(self, style=wx.CB_READONLY)
infos_sizer.AddWindow(self.Language, flag=wx.GROW)
- button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ button_sizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
- main_sizer.AddSizer(button_sizer, border=20, flag=wx.ALIGN_RIGHT|wx.BOTTOM)
+ main_sizer.AddSizer(button_sizer, border=20, flag=wx.ALIGN_RIGHT | wx.BOTTOM)
self.SetSizer(main_sizer)
@@ -106,7 +106,7 @@
elif transition_name.upper() in self.PouElementNames:
message = _("\"%s\" element for this pou already exists!") % transition_name
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/ProjectDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/ProjectDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -42,11 +42,11 @@
enable_required=enable_required)
main_sizer.AddWindow(self.ProjectProperties, flag=wx.GROW)
- self.ButtonSizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
+ self.ButtonSizer = self.CreateButtonSizer(wx.OK | wx.CANCEL | wx.CENTRE)
self.Bind(wx.EVT_BUTTON, self.OnOK,
self.ButtonSizer.GetAffirmativeButton())
main_sizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.SetSizer(main_sizer)
self.ProjectProperties.Fit()
@@ -72,7 +72,7 @@
text += ", %s" % item
dialog = wx.MessageDialog(self,
_("Form isn't complete. %s must be filled!") % text,
- _("Error"), wx.OK|wx.ICON_ERROR)
+ _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/SFCDivergenceDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/SFCDivergenceDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -100,7 +100,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.Fit()
--- a/dialogs/SFCStepDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/SFCStepDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -84,7 +84,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
# Save flag that indicates that step is initial
self.Initial = initial
--- a/dialogs/SFCStepNameDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/SFCStepNameDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -32,7 +32,7 @@
class SFCStepNameDialog(wx.TextEntryDialog):
def __init__(self, parent, message, caption="Please enter text", defaultValue="",
- style=wx.OK|wx.CANCEL|wx.CENTRE, pos=wx.DefaultPosition):
+ style=wx.OK | wx.CANCEL | wx.CENTRE, pos=wx.DefaultPosition):
wx.TextEntryDialog.__init__(self, parent, message, caption, defaultValue, style, pos)
self.PouNames = []
@@ -58,7 +58,7 @@
elif step_name.upper() in self.StepNames:
message = _("\"%s\" step already exists!") % step_name
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/dialogs/SFCTransitionDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/SFCTransitionDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -101,7 +101,7 @@
# Add buttons sizer to sizers
self.MainSizer.AddSizer(self.ButtonSizer, border=20,
- flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_RIGHT | wx.BOTTOM | wx.LEFT | wx.RIGHT)
self.Fit()
--- a/dialogs/SearchInProjectDialog.py Tue Aug 15 22:38:43 2017 +0300
+++ b/dialogs/SearchInProjectDialog.py Wed Aug 16 11:47:27 2017 +0300
@@ -53,7 +53,7 @@
pattern_sizer = wx.FlexGridSizer(cols=2, hgap=5, rows=2, vgap=5)
pattern_sizer.AddGrowableCol(0)
main_sizer.AddSizer(pattern_sizer, border=20,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
pattern_label = wx.StaticText(self, label=_('Pattern to search:'))
pattern_sizer.AddWindow(pattern_label, flag=wx.ALIGN_BOTTOM)
@@ -71,17 +71,17 @@
scope_staticbox = wx.StaticBox(self, label=_('Scope'))
scope_sizer = wx.StaticBoxSizer(scope_staticbox, wx.HORIZONTAL)
main_sizer.AddSizer(scope_sizer, border=20,
- flag=wx.GROW|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.LEFT | wx.RIGHT)
scope_selection_sizer = wx.BoxSizer(wx.VERTICAL)
scope_sizer.AddSizer(scope_selection_sizer, 1, border=5,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.BOTTOM)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.BOTTOM)
self.WholeProject = wx.RadioButton(self, label=_('Whole Project'), style=wx.RB_GROUP)
self.WholeProject.SetValue(True)
self.Bind(wx.EVT_RADIOBUTTON, self.OnScopeChanged, self.WholeProject)
scope_selection_sizer.AddWindow(self.WholeProject, border=5,
- flag=wx.GROW|wx.BOTTOM)
+ flag=wx.GROW | wx.BOTTOM)
self.OnlyElements = wx.RadioButton(self, label=_('Only Elements'))
self.Bind(wx.EVT_RADIOBUTTON, self.OnScopeChanged, self.OnlyElements)
@@ -91,7 +91,7 @@
self.ElementsList = wx.CheckListBox(self)
self.ElementsList.Enable(False)
scope_sizer.AddWindow(self.ElementsList, 1, border=5,
- flag=wx.GROW|wx.TOP|wx.RIGHT|wx.BOTTOM)
+ flag=wx.GROW | wx.TOP | wx.RIGHT | wx.BOTTOM)
buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
main_sizer.AddSizer(buttons_sizer, border=20,
@@ -167,7 +167,7 @@
message = _("Syntax error in regular expression of pattern to search!")
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
else:
--- a/docutil/dochtml.py Tue Aug 15 22:38:43 2017 +0300
+++ b/docutil/dochtml.py Wed Aug 16 11:47:27 2017 +0300
@@ -75,7 +75,7 @@
self.HtmlContent = UrlClickHtmlWindow(id=ID_HTMLFRAMEHTMLCONTENT,
name='HtmlContent', parent=self, pos=wx.Point(0, 0),
- size=wx.Size(-1, -1), style=wx.html.HW_SCROLLBAR_AUTO|wx.html.HW_NO_SELECTION)
+ size=wx.Size(-1, -1), style=wx.html.HW_SCROLLBAR_AUTO | wx.html.HW_NO_SELECTION)
self.HtmlContent.Bind(HtmlWindowUrlClick, self.OnLinkClick)
def __init__(self, parent, opened):
--- a/editors/CodeFileEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/CodeFileEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -153,7 +153,7 @@
section_infos["comment"] + "(.*)" +
section_end, re.DOTALL)
- self.SetModEventMask(wx.stc.STC_MOD_BEFOREINSERT|wx.stc.STC_MOD_BEFOREDELETE)
+ self.SetModEventMask(wx.stc.STC_MOD_BEFOREINSERT | wx.stc.STC_MOD_BEFOREDELETE)
self.Bind(wx.stc.EVT_STC_DO_DROP, self.OnDoDrop)
self.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
@@ -171,8 +171,8 @@
def OnModification(self, event):
if not self.DisableEvents:
mod_type = event.GetModificationType()
- if not (mod_type&wx.stc.STC_PERFORMED_UNDO or mod_type&wx.stc.STC_PERFORMED_REDO):
- if mod_type&wx.stc.STC_MOD_BEFOREINSERT:
+ if not (mod_type & wx.stc.STC_PERFORMED_UNDO or mod_type & wx.stc.STC_PERFORMED_REDO):
+ if mod_type & wx.stc.STC_MOD_BEFOREINSERT:
if self.CurrentAction is None:
self.StartBuffering()
elif self.CurrentAction[0] != "Add" or self.CurrentAction[1] != event.GetPosition() - 1:
@@ -180,7 +180,7 @@
self.StartBuffering()
self.CurrentAction = ("Add", event.GetPosition())
wx.CallAfter(self.RefreshModel)
- elif mod_type&wx.stc.STC_MOD_BEFOREDELETE:
+ elif mod_type & wx.stc.STC_MOD_BEFOREDELETE:
if self.CurrentAction is None:
self.StartBuffering()
elif self.CurrentAction[0] != "Delete" or self.CurrentAction[1] != event.GetPosition() + 1:
@@ -764,7 +764,7 @@
return self.ParentWindow.GetPanelBestSize()
def ShowErrorMessage(self, message):
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/editors/ConfTreeNodeEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/ConfTreeNodeEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -139,14 +139,14 @@
if tabs_num > 1 or self.SHOW_BASE_PARAMS:
self.Editor = wx.Panel(parent,
- style=wx.SUNKEN_BORDER|wx.SP_3D)
+ style=wx.SUNKEN_BORDER | wx.SP_3D)
self.MainSizer = wx.BoxSizer(wx.VERTICAL)
if self.SHOW_BASE_PARAMS:
baseparamseditor_sizer = wx.BoxSizer(wx.HORIZONTAL)
self.MainSizer.AddSizer(baseparamseditor_sizer, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
self.FullIECChannel = wx.StaticText(self.Editor, -1)
self.FullIECChannel.SetFont(
@@ -157,7 +157,7 @@
updownsizer = wx.BoxSizer(wx.VERTICAL)
baseparamseditor_sizer.AddSizer(updownsizer, border=5,
- flag=wx.LEFT|wx.ALIGN_CENTER_VERTICAL)
+ flag=wx.LEFT | wx.ALIGN_CENTER_VERTICAL)
self.IECCUpButton = wx.lib.buttons.GenBitmapTextButton(self.Editor,
bitmap=GetBitmap('IECCDown'), size=wx.Size(16, 16), style=wx.NO_BORDER)
@@ -180,7 +180,7 @@
self.GetTextCtrlCallBackFunction(self.ConfNodeName, "BaseParams.Name", True),
self.ConfNodeName)
baseparamseditor_sizer.AddWindow(self.ConfNodeName, border=5,
- flag=wx.LEFT|wx.RIGHT|wx.ALIGN_CENTER_VERTICAL)
+ flag=wx.LEFT | wx.RIGHT | wx.ALIGN_CENTER_VERTICAL)
buttons_sizer = self.GenerateMethodButtonSizer()
baseparamseditor_sizer.AddSizer(buttons_sizer, flag=wx.ALIGN_CENTER)
@@ -209,7 +209,7 @@
if self.SHOW_PARAMS and len(self.Controler.GetParamsAttributes()) > 0:
- panel_style = wx.TAB_TRAVERSAL|wx.HSCROLL|wx.VSCROLL
+ panel_style = wx.TAB_TRAVERSAL | wx.HSCROLL | wx.VSCROLL
if self.ConfNodeNoteBook is None and parent != self.Editor:
panel_style |= wx.SUNKEN_BORDER
self.ParamsEditor = wx.ScrolledWindow(parent,
@@ -224,7 +224,7 @@
self.ConfNodeParamsSizer = wx.BoxSizer(wx.VERTICAL)
self.ParamsEditorSizer.AddSizer(self.ConfNodeParamsSizer, border=5,
- flag=wx.LEFT|wx.RIGHT|wx.BOTTOM)
+ flag=wx.LEFT | wx.RIGHT | wx.BOTTOM)
self.RefreshConfNodeParamsSizer()
@@ -367,7 +367,7 @@
statictext = wx.StaticText(self.ParamsEditor,
label="%s:" % _(element_infos["name"]))
boxsizer.AddWindow(statictext, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.RIGHT)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.RIGHT)
if isinstance(element_infos["type"], types.ListType):
if isinstance(element_infos["value"], types.TupleType):
@@ -426,7 +426,7 @@
if "max" in element_infos["type"]:
scmax = element_infos["type"]["max"]
spinctrl = wx.SpinCtrl(self.ParamsEditor,
- size=wx.Size(300, -1), style=wx.SP_ARROW_KEYS|wx.ALIGN_RIGHT)
+ size=wx.Size(300, -1), style=wx.SP_ARROW_KEYS | wx.ALIGN_RIGHT)
spinctrl.SetRange(scmin, scmax)
boxsizer.AddWindow(spinctrl)
if element_infos["value"] is not None:
@@ -452,7 +452,7 @@
scmin = -(2**31)
scmax = 2**31-1
spinctrl = wx.SpinCtrl(self.ParamsEditor,
- size=wx.Size(300, -1), style=wx.SP_ARROW_KEYS|wx.ALIGN_RIGHT)
+ size=wx.Size(300, -1), style=wx.SP_ARROW_KEYS | wx.ALIGN_RIGHT)
spinctrl.SetRange(scmin, scmax)
boxsizer.AddWindow(spinctrl)
if element_infos["value"] is not None:
--- a/editors/DataTypeEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/DataTypeEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -153,21 +153,21 @@
top_sizer = wx.BoxSizer(wx.HORIZONTAL)
self.MainSizer.AddSizer(top_sizer, border=5,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
derivation_type_label = wx.StaticText(self.Editor, label=_('Derivation Type:'))
top_sizer.AddWindow(derivation_type_label, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.LEFT|wx.RIGHT)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT)
self.DerivationType = wx.ComboBox(self.Editor,
size=wx.Size(200, -1), style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnDerivationTypeChanged, self.DerivationType)
- top_sizer.AddWindow(self.DerivationType, border=5, flag=wx.GROW|wx.RIGHT)
+ top_sizer.AddWindow(self.DerivationType, border=5, flag=wx.GROW | wx.RIGHT)
typeinfos_staticbox = wx.StaticBox(self.Editor, label=_('Type infos:'))
typeinfos_sizer = wx.StaticBoxSizer(typeinfos_staticbox, wx.HORIZONTAL)
self.MainSizer.AddSizer(typeinfos_sizer, border=5,
- flag=wx.GROW|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT)
# Panel for Directly derived data types
@@ -179,20 +179,20 @@
directly_basetype_label = wx.StaticText(self.DirectlyPanel,
label=_('Base Type:'))
directly_panel_sizer.AddWindow(directly_basetype_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.DirectlyBaseType = wx.ComboBox(self.DirectlyPanel, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnInfosChanged, self.DirectlyBaseType)
directly_panel_sizer.AddWindow(self.DirectlyBaseType, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
directly_initialvalue_label = wx.StaticText(self.DirectlyPanel,
label=_('Initial Value:'))
directly_panel_sizer.AddWindow(directly_initialvalue_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.DirectlyInitialValue = wx.TextCtrl(self.DirectlyPanel,
- style=wx.TE_PROCESS_ENTER|wx.TE_RICH)
+ style=wx.TE_PROCESS_ENTER | wx.TE_RICH)
self.Bind(wx.EVT_TEXT_ENTER, self.OnReturnKeyPressed, self.DirectlyInitialValue)
directly_panel_sizer.AddWindow(self.DirectlyInitialValue, 1, border=5,
flag=wx.ALL)
@@ -209,33 +209,33 @@
subrange_basetype_label = wx.StaticText(self.SubrangePanel,
label=_('Base Type:'))
subrange_panel_sizer.AddWindow(subrange_basetype_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.SubrangeBaseType = wx.ComboBox(self.SubrangePanel, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnSubrangeBaseTypeChanged,
self.SubrangeBaseType)
subrange_panel_sizer.AddWindow(self.SubrangeBaseType, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
subrange_initialvalue_label = wx.StaticText(self.SubrangePanel,
label=_('Initial Value:'))
subrange_panel_sizer.AddWindow(subrange_initialvalue_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.SubrangeInitialValue = wx.SpinCtrl(self.SubrangePanel,
style=wx.TAB_TRAVERSAL)
self.Bind(wx.EVT_SPINCTRL, self.OnInfosChanged, self.SubrangeInitialValue)
subrange_panel_sizer.AddWindow(self.SubrangeInitialValue, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
subrange_minimum_label = wx.StaticText(self.SubrangePanel, label=_('Minimum:'))
subrange_panel_sizer.AddWindow(subrange_minimum_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.SubrangeMinimum = wx.SpinCtrl(self.SubrangePanel, style=wx.TAB_TRAVERSAL)
self.Bind(wx.EVT_SPINCTRL, self.OnSubrangeMinimumChanged, self.SubrangeMinimum)
subrange_panel_sizer.AddWindow(self.SubrangeMinimum, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
for i in xrange(2):
subrange_panel_sizer.AddWindow(wx.Size(0, 0), 1)
@@ -243,13 +243,13 @@
subrange_maximum_label = wx.StaticText(self.SubrangePanel,
label=_('Maximum:'))
subrange_panel_sizer.AddWindow(subrange_maximum_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.SubrangeMaximum = wx.SpinCtrl(self.SubrangePanel, style=wx.TAB_TRAVERSAL)
self.Bind(wx.EVT_SPINCTRL, self.OnSubrangeMaximumChanged, self.SubrangeMaximum)
subrange_panel_sizer.AddWindow(self.SubrangeMaximum, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
self.SubrangePanel.SetSizer(subrange_panel_sizer)
@@ -268,7 +268,7 @@
for func in ["_OnAddButton", "_OnDelButton", "_OnUpButton", "_OnDownButton"]:
setattr(self.EnumeratedValues, func, self.OnEnumeratedValuesChanged)
enumerated_panel_sizer.AddWindow(self.EnumeratedValues, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
enumerated_panel_rightsizer = wx.BoxSizer(wx.HORIZONTAL)
enumerated_panel_sizer.AddSizer(enumerated_panel_rightsizer, 1)
@@ -276,7 +276,7 @@
enumerated_initialvalue_label = wx.StaticText(self.EnumeratedPanel,
label=_('Initial Value:'))
enumerated_panel_rightsizer.AddWindow(enumerated_initialvalue_label, 1,
- border=5, flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ border=5, flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.EnumeratedInitialValue = wx.ComboBox(self.EnumeratedPanel,
style=wx.CB_READONLY)
@@ -301,12 +301,12 @@
array_basetype_label = wx.StaticText(self.ArrayPanel, label=_('Base Type:'))
array_panel_leftSizer.AddWindow(array_basetype_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.ArrayBaseType = wx.ComboBox(self.ArrayPanel, style=wx.CB_READONLY)
self.Bind(wx.EVT_COMBOBOX, self.OnInfosChanged, self.ArrayBaseType)
array_panel_leftSizer.AddWindow(self.ArrayBaseType, 1, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
array_panel_rightsizer = wx.BoxSizer(wx.HORIZONTAL)
array_panel_sizer.AddSizer(array_panel_rightsizer, flag=wx.GROW)
@@ -314,10 +314,10 @@
array_initialvalue_label = wx.StaticText(self.ArrayPanel,
label=_('Initial Value:'))
array_panel_rightsizer.AddWindow(array_initialvalue_label, 1, border=5,
- flag=wx.ALIGN_CENTER_VERTICAL|wx.ALL)
+ flag=wx.ALIGN_CENTER_VERTICAL | wx.ALL)
self.ArrayInitialValue = wx.TextCtrl(self.ArrayPanel,
- style=wx.TE_PROCESS_ENTER|wx.TE_RICH)
+ style=wx.TE_PROCESS_ENTER | wx.TE_RICH)
self.Bind(wx.EVT_TEXT_ENTER, self.OnReturnKeyPressed, self.ArrayInitialValue)
array_panel_rightsizer.AddWindow(self.ArrayInitialValue, 1, border=5,
flag=wx.ALL)
@@ -330,7 +330,7 @@
"_OnUpButton", "_OnDownButton"]:
setattr(self.ArrayDimensions, func, self.OnDimensionsChanged)
array_panel_sizer.AddWindow(self.ArrayDimensions, 0, border=5,
- flag=wx.GROW|wx.ALL)
+ flag=wx.GROW | wx.ALL)
self.ArrayPanel.SetSizer(array_panel_sizer)
@@ -347,7 +347,7 @@
structure_button_sizer.AddGrowableCol(0)
structure_button_sizer.AddGrowableRow(0)
structure_panel_sizer.AddSizer(structure_button_sizer, 0, border=5,
- flag=wx.ALL|wx.GROW)
+ flag=wx.ALL | wx.GROW)
structure_elements_label = wx.StaticText(self.StructurePanel,
label=_('Elements :'))
@@ -552,12 +552,12 @@
index = event.GetIndex()
if index >= len(values) or values[index].upper() != text.upper():
if text.upper() in [value.upper() for value in values]:
- message = wx.MessageDialog(self, _("\"%s\" value already defined!") % text, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("\"%s\" value already defined!") % text, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
event.Veto()
elif text.upper() in IEC_KEYWORDS:
- message = wx.MessageDialog(self, _("\"%s\" is a keyword. It can't be used!") % text, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("\"%s\" is a keyword. It can't be used!") % text, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
else:
@@ -576,7 +576,7 @@
event.Skip()
def ShowErrorMessage(self, message):
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
@@ -745,14 +745,14 @@
for dimensions in self.ArrayDimensions.GetStrings():
result = DIMENSION_MODEL.match(dimensions)
if result is None:
- message = wx.MessageDialog(self, _("\"%s\" value isn't a valid array dimension!") % dimensions, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("\"%s\" value isn't a valid array dimension!") % dimensions, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
self.RefreshView()
return
bounds = result.groups()
if int(bounds[0]) >= int(bounds[1]):
- message = wx.MessageDialog(self, _("\"%s\" value isn't a valid array dimension!\nRight value must be greater than left value.") % dimensions, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("\"%s\" value isn't a valid array dimension!\nRight value must be greater than left value.") % dimensions, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
self.RefreshView()
--- a/editors/EditorPanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/EditorPanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -39,7 +39,7 @@
def _init_ctrls(self, parent):
wx.SplitterWindow.__init__(self, parent,
- style=wx.SUNKEN_BORDER|wx.SP_3D)
+ style=wx.SUNKEN_BORDER | wx.SP_3D)
self.SetMinimumPaneSize(1)
self._init_MenuItems()
--- a/editors/FileManagementPanel.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/FileManagementPanel.py Wed Aug 16 11:47:27 2017 +0300
@@ -43,10 +43,10 @@
main_sizer = wx.BoxSizer(wx.HORIZONTAL)
left_sizer = wx.BoxSizer(wx.VERTICAL)
- main_sizer.AddSizer(left_sizer, 1, border=5, flag=wx.GROW|wx.ALL)
+ main_sizer.AddSizer(left_sizer, 1, border=5, flag=wx.GROW | wx.ALL)
managed_dir_label = wx.StaticText(self.Editor, label=_(self.TagName) + ":")
- left_sizer.AddWindow(managed_dir_label, border=5, flag=wx.GROW|wx.BOTTOM)
+ left_sizer.AddWindow(managed_dir_label, border=5, flag=wx.GROW | wx.BOTTOM)
self.ManagedDir = FolderTree(self.Editor, self.Folder, FILTER)
left_sizer.AddWindow(self.ManagedDir, 1, flag=wx.GROW)
@@ -58,7 +58,7 @@
button_sizer = wx.BoxSizer(wx.VERTICAL)
main_sizer.AddSizer(button_sizer, border=5,
- flag=wx.ALL|wx.ALIGN_CENTER_VERTICAL)
+ flag=wx.ALL | wx.ALIGN_CENTER_VERTICAL)
for idx, (name, bitmap, help) in enumerate([
("DeleteButton", "remove_element", _("Remove file from left folder")),
@@ -78,13 +78,13 @@
button_sizer.AddWindow(button, border=20, flag=flag)
right_sizer = wx.BoxSizer(wx.VERTICAL)
- main_sizer.AddSizer(right_sizer, 1, border=5, flag=wx.GROW|wx.ALL)
+ main_sizer.AddSizer(right_sizer, 1, border=5, flag=wx.GROW | wx.ALL)
if wx.Platform == '__WXMSW__':
system_dir_label = wx.StaticText(self.Editor, label=_("My Computer:"))
else:
system_dir_label = wx.StaticText(self.Editor, label=_("Home Directory:"))
- right_sizer.AddWindow(system_dir_label, border=5, flag=wx.GROW|wx.BOTTOM)
+ right_sizer.AddWindow(system_dir_label, border=5, flag=wx.GROW | wx.BOTTOM)
self.SystemDir = FolderTree(self.Editor, self.HomeDirectory, FILTER, False)
right_sizer.AddWindow(self.SystemDir, 1, flag=wx.GROW)
@@ -151,7 +151,7 @@
dialog = wx.MessageDialog(self,
_("Do you really want to delete the file '%s'?") % filename,
- _("Delete File"), wx.YES_NO|wx.ICON_QUESTION)
+ _("Delete File"), wx.YES_NO | wx.ICON_QUESTION)
remove = dialog.ShowModal() == wx.ID_YES
dialog.Destroy()
@@ -179,7 +179,7 @@
if os.path.isfile(dst_filepath):
dialog = wx.MessageDialog(self,
_("The file '%s' already exist.\nDo you want to replace it?") % src_filename,
- _("Replace File"), wx.YES_NO|wx.ICON_QUESTION)
+ _("Replace File"), wx.YES_NO | wx.ICON_QUESTION)
copy = dialog.ShowModal() == wx.ID_YES
dialog.Destroy()
else:
--- a/editors/LDViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/LDViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -666,7 +666,7 @@
self.RefreshVisibleElements()
self.Refresh(False)
else:
- message = wx.MessageDialog(self, _("You must select the wire where a contact should be added!"), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("You must select the wire where a contact should be added!"), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
@@ -882,16 +882,16 @@
self.RefreshVisibleElements()
self.Refresh(False)
else:
- message = wx.MessageDialog(self, _("The group of block must be coherent!"), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("The group of block must be coherent!"), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
else:
- message = wx.MessageDialog(self, _("You must select the block or group of blocks around which a branch should be added!"), _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self, _("You must select the block or group of blocks around which a branch should be added!"), _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
def AddLadderBlock(self):
- message = wx.MessageDialog(self, _("This option isn't available yet!"), _("Warning"), wx.OK|wx.ICON_EXCLAMATION)
+ message = wx.MessageDialog(self, _("This option isn't available yet!"), _("Warning"), wx.OK | wx.ICON_EXCLAMATION)
message.ShowModal()
message.Destroy()
--- a/editors/ResourceEditor.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/ResourceEditor.py Wed Aug 16 11:47:27 2017 +0300
@@ -217,7 +217,7 @@
VARIABLE_PANEL_TYPE = "resource"
def _init_Editor(self, parent):
- self.Editor = wx.Panel(parent, style=wx.SUNKEN_BORDER|wx.TAB_TRAVERSAL)
+ self.Editor = wx.Panel(parent, style=wx.SUNKEN_BORDER | wx.TAB_TRAVERSAL)
main_sizer = wx.FlexGridSizer(cols=1, hgap=0, rows=2, vgap=5)
main_sizer.AddGrowableCol(0)
@@ -228,7 +228,7 @@
tasks_sizer.AddGrowableCol(0)
tasks_sizer.AddGrowableRow(1)
main_sizer.AddSizer(tasks_sizer, border=5,
- flag=wx.GROW|wx.TOP|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.TOP | wx.LEFT | wx.RIGHT)
tasks_buttons_sizer = wx.FlexGridSizer(cols=5, hgap=5, rows=1, vgap=0)
tasks_buttons_sizer.AddGrowableCol(0)
@@ -257,7 +257,7 @@
instances_sizer.AddGrowableCol(0)
instances_sizer.AddGrowableRow(1)
main_sizer.AddSizer(instances_sizer, border=5,
- flag=wx.GROW|wx.BOTTOM|wx.LEFT|wx.RIGHT)
+ flag=wx.GROW | wx.BOTTOM | wx.LEFT | wx.RIGHT)
instances_buttons_sizer = wx.FlexGridSizer(cols=5, hgap=5, rows=1, vgap=0)
instances_buttons_sizer.AddGrowableCol(0)
@@ -436,7 +436,7 @@
self.InstancesGrid.RefreshButtons()
def ShowErrorMessage(self, message):
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
--- a/editors/SFCViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/SFCViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -430,7 +430,7 @@
#-------------------------------------------------------------------------------
def AddInitialStep(self, pos):
- dialog = SFCStepNameDialog(self.ParentWindow, _("Please enter step name"), _("Add a new initial step"), "", wx.OK|wx.CANCEL)
+ dialog = SFCStepNameDialog(self.ParentWindow, _("Please enter step name"), _("Add a new initial step"), "", wx.OK | wx.CANCEL)
dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug))
dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, debug=self.Debug))
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)])
@@ -452,7 +452,7 @@
def AddStep(self):
if self.SelectedElement in self.Wires or isinstance(self.SelectedElement, SFC_Step):
- dialog = SFCStepNameDialog(self.ParentWindow, _("Add a new step"), _("Please enter step name"), "", wx.OK|wx.CANCEL)
+ dialog = SFCStepNameDialog(self.ParentWindow, _("Add a new step"), _("Please enter step name"), "", wx.OK | wx.CANCEL)
dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug))
dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, debug=self.Debug))
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step)])
@@ -768,7 +768,7 @@
choices.append(block.GetName())
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Add a new jump"), _("Please choose a target"),
- choices, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ choices, wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetStringSelection()
self.SelectedElement.AddOutput()
@@ -796,7 +796,7 @@
if self.GetDrawingMode() == FREEDRAWING_MODE:
Viewer.EditStepContent(self, step)
else:
- dialog = SFCStepNameDialog(self.ParentWindow, _("Edit step name"), _("Please enter step name"), step.GetName(), wx.OK|wx.CANCEL)
+ dialog = SFCStepNameDialog(self.ParentWindow, _("Edit step name"), _("Please enter step name"), step.GetName(), wx.OK | wx.CANCEL)
dialog.SetPouNames(self.Controler.GetProjectPouNames(self.Debug))
dialog.SetVariables(self.Controler.GetEditedElementInterfaceVars(self.TagName, debug=self.Debug))
dialog.SetStepNames([block.GetName() for block in self.Blocks if isinstance(block, SFC_Step) and block.GetName() != step.GetName()])
--- a/editors/TextViewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/TextViewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -225,7 +225,7 @@
def OnModification(self, event):
if not self.DisableEvents:
mod_type = event.GetModificationType()
- if mod_type&wx.stc.STC_MOD_BEFOREINSERT:
+ if mod_type & wx.stc.STC_MOD_BEFOREINSERT:
if self.CurrentAction is None:
self.StartBuffering()
elif self.CurrentAction[0] != "Add" or self.CurrentAction[1] != event.GetPosition() - 1:
@@ -233,7 +233,7 @@
self.StartBuffering()
self.CurrentAction = ("Add", event.GetPosition())
wx.CallAfter(self.RefreshModel)
- elif mod_type&wx.stc.STC_MOD_BEFOREDELETE:
+ elif mod_type & wx.stc.STC_MOD_BEFOREDELETE:
if self.CurrentAction is None:
self.StartBuffering()
elif self.CurrentAction[0] != "Delete" or self.CurrentAction[1] != event.GetPosition() + 1:
@@ -261,7 +261,7 @@
blockinputs = None
if values[1] != "function":
if blockname == "":
- dialog = wx.TextEntryDialog(self.ParentWindow, _("Block name"), _("Please enter a block name"), "", wx.OK|wx.CANCEL|wx.CENTRE)
+ dialog = wx.TextEntryDialog(self.ParentWindow, _("Block name"), _("Please enter a block name"), "", wx.OK | wx.CANCEL | wx.CENTRE)
if dialog.ShowModal() == wx.ID_OK:
blockname = dialog.GetValue()
else:
@@ -307,7 +307,7 @@
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Select a variable class:"), _("Variable class"),
[_("Input"), _("Output"), _("Memory")],
- wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
else:
@@ -388,7 +388,7 @@
else:
message = _("Variable don't belong to this POU!")
if message is not None:
- dialog = wx.MessageDialog(self, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ dialog = wx.MessageDialog(self, message, _("Error"), wx.OK | wx.ICON_ERROR)
dialog.ShowModal()
dialog.Destroy()
event.SetDragText("")
--- a/editors/Viewer.py Tue Aug 15 22:38:43 2017 +0300
+++ b/editors/Viewer.py Wed Aug 16 11:47:27 2017 +0300
@@ -302,7 +302,7 @@
dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow,
_("Select a variable class:"), _("Variable class"),
[_("Input"), _("Output"), _("Memory")],
- wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
selected = dialog.GetSelection()
else:
@@ -435,7 +435,7 @@
return AddVariableFunction
def ShowMessage(self, message):
- message = wx.MessageDialog(self.ParentWindow, message, _("Error"), wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self.ParentWindow, message, _("Error"), wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
@@ -2637,7 +2637,7 @@
dialog = wx.TextEntryDialog(self.ParentWindow,
_("Edit comment"),
_("Please enter comment text"),
- "", wx.OK|wx.CANCEL|wx.TE_MULTILINE)
+ "", wx.OK | wx.CANCEL | wx.TE_MULTILINE)
dialog.SetClientSize(wx.Size(400, 200))
if dialog.ShowModal() == wx.ID_OK:
value = dialog.GetValue()
@@ -2767,7 +2767,7 @@
choices.append(block.GetName())
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Add a new jump"), _("Please choose a target"),
- choices, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ choices, wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
if dialog.ShowModal() == wx.ID_OK:
id = self.GetNewId()
jump = SFC_Jump(self, dialog.GetStringSelection(), id)
@@ -3033,7 +3033,7 @@
choices.append(block.GetName())
dialog = wx.SingleChoiceDialog(self.ParentWindow,
_("Edit jump target"), _("Please choose a target"),
- choices, wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL)
+ choices, wx.DEFAULT_DIALOG_STYLE | wx.OK | wx.CANCEL)
try:
indx = choices.index(jump.GetTarget())
dialog.SetSelection(indx)
@@ -3076,7 +3076,7 @@
_("Edit comment"),
_("Please enter comment text"),
comment.GetContent(),
- wx.OK|wx.CANCEL|wx.TE_MULTILINE)
+ wx.OK | wx.CANCEL | wx.TE_MULTILINE)
width, height = comment.GetSize()
dialogSize = wx.Size(max(width + 30, 400), max(height + 60, 200))
dialog.SetClientSize(dialogSize)
@@ -3438,7 +3438,7 @@
self.RefreshVariablePanel()
self.ParentWindow.RefreshPouInstanceVariablesPanel()
else:
- message = wx.MessageDialog(self.Editor, result, "Error", wx.OK|wx.ICON_ERROR)
+ message = wx.MessageDialog(self.Editor, result, "Error", wx.OK | wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
--- a/runtime/PLCObject.py Tue Aug 15 22:38:43 2017 +0300
+++ b/runtime/PLCObject.py Wed Aug 16 11:47:27 2017 +0300
@@ -213,7 +213,7 @@
self._LogMessage.restype = ctypes.c_int
self._LogMessage.argtypes = [ctypes.c_uint8, ctypes.c_char_p, ctypes.c_uint32]
- self._log_read_buffer = ctypes.create_string_buffer(1<<14) #16K
+ self._log_read_buffer = ctypes.create_string_buffer(1 << 14) #16K
self._GetLogMessage = self.PLClibraryHandle.GetLogMessage
self._GetLogMessage.restype = ctypes.c_uint32
self._GetLogMessage.argtypes = [ctypes.c_uint8, ctypes.c_uint32, ctypes.c_char_p, ctypes.c_uint32, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_uint32)]
--- a/svgui/svgui.py Tue Aug 15 22:38:43 2017 +0300
+++ b/svgui/svgui.py Wed Aug 16 11:47:27 2017 +0300
@@ -149,7 +149,7 @@
dialog = wx.MessageDialog(self.GetCTRoot().AppFrame,
_("You don't have write permissions.\nOpen Inkscape anyway ?"),
_("Open Inkscape"),
- wx.YES_NO|wx.ICON_QUESTION)
+ wx.YES_NO | wx.ICON_QUESTION)
open_inkscape = dialog.ShowModal() == wx.ID_YES
dialog.Destroy()
if open_inkscape:
--- a/wxglade_hmi/wxglade_hmi.py Tue Aug 15 22:38:43 2017 +0300
+++ b/wxglade_hmi/wxglade_hmi.py Wed Aug 16 11:47:27 2017 +0300
@@ -157,7 +157,7 @@
dialog = wx.MessageDialog(self.GetCTRoot().AppFrame,
_("You don't have write permissions.\nOpen wxGlade anyway ?"),
_("Open wxGlade"),
- wx.YES_NO|wx.ICON_QUESTION)
+ wx.YES_NO | wx.ICON_QUESTION)
open_wxglade = dialog.ShowModal() == wx.ID_YES
dialog.Destroy()
if open_wxglade: