mwxlib 1.0.6__py3-none-any.whl → 1.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of mwxlib might be problematic. Click here for more details.

mwx/controls.py CHANGED
@@ -426,7 +426,7 @@ class Knob(wx.Panel):
426
426
  self.ctrl.SetItems(items)
427
427
  self.ctrl.SetStringSelection(str(v))
428
428
  else:
429
- self.ctrl.SetRange(0, len(v)-1) #<wx.Slider> <wx.SpinButton>
429
+ self.ctrl.SetRange(0, len(v)-1) #<wx.Slider> #<wx.SpinButton>
430
430
 
431
431
  def update_label(self):
432
432
  """Called when label is being changed (internal use only)."""
@@ -482,7 +482,7 @@ class Knob(wx.Panel):
482
482
  v.index = j
483
483
  v.reset(v.value)
484
484
 
485
- def OnScroll(self, evt): #<wx._core.ScrollEvent><wx._controls.SpinEvent><wx._core.CommandEvent>
485
+ def OnScroll(self, evt): #<wx._core.ScrollEvent> #<wx._controls.SpinEvent> #<wx._core.CommandEvent>
486
486
  v = self.__par
487
487
  j = self.ctrl.GetValue()
488
488
  if j != v.index:
mwx/framework.py CHANGED
@@ -1,7 +1,7 @@
1
1
  #! python3
2
2
  """mwxlib framework.
3
3
  """
4
- __version__ = "1.0.6"
4
+ __version__ = "1.0.8"
5
5
  __author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
6
6
 
7
7
  from contextlib import contextmanager
@@ -266,8 +266,7 @@ class KeyCtrlInterfaceMixin:
266
266
  ## Check text selection for [C-c/C-x].
267
267
  wnd = wx.Window.FindFocus()
268
268
  if isinstance(wnd, wx.TextEntry) and wnd.StringSelection\
269
- or isinstance(wnd, stc.StyledTextCtrl) and wnd.SelectedText:
270
- ## or any other of pre-selection-p?
269
+ or isinstance(wnd, stc.StyledTextCtrl) and wnd.SelectedText:
271
270
  self.handler('quit', evt)
272
271
  else:
273
272
  self.message(evt.key + '-')
@@ -275,6 +274,9 @@ class KeyCtrlInterfaceMixin:
275
274
 
276
275
  def post_command_hook(self, evt):
277
276
  """Called when exiting extension mode (internal use only)."""
277
+ ## Check if the event has reached a top-level window.
278
+ if isinstance(self, wx.TopLevelWindow):
279
+ return
278
280
  keymap = self.handler.previous_state
279
281
  if keymap:
280
282
  self.message("{} {}".format(keymap, evt.key))
@@ -729,11 +731,6 @@ class Frame(wx.Frame, KeyCtrlInterfaceMixin):
729
731
 
730
732
  message = property(lambda self: self.statusbar)
731
733
 
732
- def post_command_hook(self, evt):
733
- ## (override) Don't skip events as a TopLevelWindow.
734
- pass
735
- post_command_hook.__name__ = str('noskip')
736
-
737
734
  def __init__(self, *args, **kwargs):
738
735
  wx.Frame.__init__(self, *args, **kwargs)
739
736
 
@@ -808,11 +805,6 @@ class MiniFrame(wx.MiniFrame, KeyCtrlInterfaceMixin):
808
805
 
809
806
  message = property(lambda self: self.statusbar)
810
807
 
811
- def post_command_hook(self, evt):
812
- ## (override) Don't skip events as a TopLevelWindow.
813
- pass
814
- post_command_hook.__name__ = str('noskip')
815
-
816
808
  def __init__(self, *args, **kwargs):
817
809
  wx.MiniFrame.__init__(self, *args, **kwargs)
818
810
 
mwx/graphman.py CHANGED
@@ -261,6 +261,12 @@ class LayerInterface(CtrlInterface):
261
261
  ## thread_type = Thread
262
262
  thread = None
263
263
 
264
+ ## layout helper function (internal use only)
265
+ pack = mwx.pack
266
+
267
+ ## funcall = interactive_call (internal use only)
268
+ funcall = staticmethod(_F)
269
+
264
270
  ## for debug (internal use only)
265
271
  pane = property(lambda self: self.parent.get_pane(self))
266
272
 
mwx/matplot2.py CHANGED
@@ -160,6 +160,12 @@ class MatplotPanel(wx.Panel):
160
160
  if self.handler.fork(self.handler.current_event, evt) is None:
161
161
  evt.Skip()
162
162
 
163
+ def skip(evt): #<wx._core.KeyEvent> #<matplotlib.backend_bases.MouseEvent>
164
+ try:
165
+ evt.Skip()
166
+ except AttributeError:
167
+ pass
168
+
163
169
  self.__handler = FSM({ # DNA<MatplotPanel>
164
170
  None : {
165
171
  'canvas_draw' : [ None, self.OnDraw ], # before canvas.draw
@@ -188,6 +194,7 @@ class MatplotPanel(wx.Panel):
188
194
  'space pressed' : (PAN, self.OnPanBegin),
189
195
  'ctrl pressed' : (PAN, self.OnPanBegin),
190
196
  'z pressed' : (ZOOM, self.OnZoomBegin),
197
+ '* pressed' : (NORMAL, skip),
191
198
  'xaxis motion' : (XAXIS, self.OnAxisEnter),
192
199
  'yaxis motion' : (YAXIS, self.OnAxisEnter),
193
200
  'y2axis motion' : (YAXIS, self.OnAxisEnter),
mwx/nutshell.py CHANGED
@@ -1785,16 +1785,6 @@ class Buffer(EditorInterface, EditWindow):
1785
1785
  """
1786
1786
  return self.mtdelta is not None and self.mtdelta > 0
1787
1787
 
1788
- def pre_command_hook(self, evt):
1789
- self.parent.handler(self.handler.current_event, evt)
1790
- return EditorInterface.pre_command_hook(self, evt)
1791
- pre_command_hook.__name__ = str('pre_command_dispatch') # alias
1792
-
1793
- def post_command_hook(self, evt):
1794
- self.parent.handler(self.handler.current_event, evt)
1795
- return EditorInterface.post_command_hook(self, evt)
1796
- post_command_hook.__name__ = str('post_command_dispatch') # alias
1797
-
1798
1788
  def __init__(self, parent, filename, **kwargs):
1799
1789
  EditWindow.__init__(self, parent, **kwargs)
1800
1790
  EditorInterface.__init__(self)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mwxlib
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: A wrapper of matplotlib and wxPython (phoenix)
5
5
  Home-page: https://github.com/komoto48g/mwxlib
6
6
  Author: Kazuya O'moto
@@ -1,14 +1,14 @@
1
1
  mwx/__init__.py,sha256=psabnAMei5VzB2TsB2qBNLrIZMX0LiqjlXCpNGmDejk,668
2
2
  mwx/bookshelf.py,sha256=so-xSLq08sMlJBErTxOaDoKUAMa_g1CkIP2pNnff68c,5607
3
- mwx/controls.py,sha256=iXNTk4ge6sHStenjxC7bFKgQHvqxMwfb82IbgiDmtEk,47944
4
- mwx/framework.py,sha256=Y0YBqjcbfPMTqal_-vN9LPAXaHVNTYbxQ1UpMbVAb_8,75818
5
- mwx/graphman.py,sha256=mDnhy3jAzZCo8_p6ZcA-NDPMuOyW_R2r_fuxUIAM7D8,69669
3
+ mwx/controls.py,sha256=cNZkgwSv90lPIz61FvMtYxHIt8hJD_RQYXxsgTQIdLc,47949
4
+ mwx/framework.py,sha256=7UOFDQD5cBnJSpjGtBJ6nEfQj4lPbnLHLGYh2o0YX_4,75565
5
+ mwx/graphman.py,sha256=04bEw7TEIs6X1QrgqBSLJoIhJnW5TwHTW_wZOvJYSwo,69840
6
6
  mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
7
- mwx/matplot2.py,sha256=zA56jIdRUdzu-wrmPai1PSOjzqV2Erqw2yFKW-jwdA8,32901
7
+ mwx/matplot2.py,sha256=RuVWXC2A_qgZRNmBBptbHDn5MyxaWBqp3ru4bP_lDE0,33150
8
8
  mwx/matplot2g.py,sha256=4G5uZJZzATEC3QEVZ4pGHetEDfu5NJNUFyeAaQScK5s,64495
9
9
  mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
10
10
  mwx/mgplt.py,sha256=M5rt-H7Uq1OHnlFvMA4a3945UBvppbR9L_mw8NL_YZ0,5602
11
- mwx/nutshell.py,sha256=9QeJXQluEmZSB0B8rGSH9SU_WvjCymmDdU0DKd3fkko,142076
11
+ mwx/nutshell.py,sha256=-6EUNTpbbcaAt1ftYEgm19MySeAOasyFjPfw_G933E8,141602
12
12
  mwx/utilus.py,sha256=Yyw8L1f-ikhyd7wtFXYtsOswofWxmB4GAmLOZnhUXeU,37388
13
13
  mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
14
14
  mwx/wxpdb.py,sha256=--TQr-_zs9dWPYV2V4s3Zr4abvN14o5wD8anT9frHUg,18875
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs
21
21
  mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
22
22
  mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
23
23
  mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
24
- mwxlib-1.0.6.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
- mwxlib-1.0.6.dist-info/METADATA,sha256=p5q3rC09GOoq4pW_UWNKP7Z1SvrX24kKCy-I19tKmts,7259
26
- mwxlib-1.0.6.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
27
- mwxlib-1.0.6.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-1.0.6.dist-info/RECORD,,
24
+ mwxlib-1.0.8.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
+ mwxlib-1.0.8.dist-info/METADATA,sha256=wDntpV53vitECSUlpXqzoxKAr4Fhm1FwTexuDJrtavM,7259
26
+ mwxlib-1.0.8.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
27
+ mwxlib-1.0.8.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-1.0.8.dist-info/RECORD,,
File without changes