mwxlib 1.4.12__py3-none-any.whl → 1.4.20__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.

@@ -157,20 +157,18 @@ class Plugin(Layer):
157
157
 
158
158
  self.mc.Bind(wx.EVT_KEY_DOWN, self.on_hotkey_down)
159
159
  self.mc.Bind(wx.EVT_KEY_UP, self.on_hotkey_up)
160
-
161
- self.Bind(wx.EVT_SHOW, self.OnShow)
162
160
 
163
161
  def Destroy(self):
164
- try:
165
- self.parent.handler.unbind("unknown_format", self.load_media)
166
- finally:
167
- return Layer.Destroy(self)
162
+ self.parent.handler.unbind("unknown_format", self.load_media)
163
+ if self.mc:
164
+ self.mc.Destroy()
165
+ return Layer.Destroy(self)
168
166
 
169
167
  def OnShow(self, evt):
170
168
  if not evt.IsShown():
171
169
  if self.mc:
172
170
  self.mc.Stop()
173
- evt.Skip()
171
+ Layer.OnShow(self, evt)
174
172
 
175
173
  def OnMediaLoaded(self, evt):
176
174
  self.ss.range = (0, self.video_dur, 0.01)
@@ -113,10 +113,8 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
113
113
  lambda v: Menu.Popup(self, self.menu))
114
114
 
115
115
  def Destroy(self):
116
- try:
117
- self.Target.handler.remove(self.context)
118
- finally:
119
- return wx.ListCtrl.Destroy(self)
116
+ self.Target.handler.remove(self.context)
117
+ return wx.ListCtrl.Destroy(self)
120
118
 
121
119
  def UpdateInfo(self, frame):
122
120
  ls = ("{}".format(frame.index),
mwx/utilus.py CHANGED
@@ -16,8 +16,7 @@ import fnmatch
16
16
  import pkgutil
17
17
  import pydoc
18
18
  import inspect
19
- from inspect import (isclass, ismodule, ismethod, isbuiltin,
20
- isfunction, isgenerator, isframe, iscode, istraceback)
19
+ from inspect import isclass, ismodule, ismethod, isbuiltin, isfunction, isgenerator # noqa
21
20
  from pprint import pprint
22
21
 
23
22
 
mwx/wxmon.py CHANGED
@@ -107,7 +107,8 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
107
107
  return
108
108
  if not isinstance(widget, wx.Object):
109
109
  wx.MessageBox("Cannot watch the widget.\n\n"
110
- "- {!r} is not a wx.Object.".format(widget))
110
+ "- {!r} is not a wx.Object.".format(widget),
111
+ self.__module__)
111
112
  return
112
113
  self._target = widget
113
114
  self.target = widget
mwx/wxpdb.py CHANGED
@@ -243,7 +243,6 @@ class Debugger(Pdb):
243
243
  f"Debugger is closed.\n\n{e}")
244
244
  finally:
245
245
  self.set_quit()
246
- return
247
246
 
248
247
  def run(self, cmd, filename="<string>"):
249
248
  """Debug a statement executed via the exec() function.
@@ -270,7 +269,6 @@ class Debugger(Pdb):
270
269
  f"Debugger is closed.\n\n{e}")
271
270
  finally:
272
271
  self.set_quit()
273
- return
274
272
 
275
273
  ## --------------------------------
276
274
  ## Actions for handler
mwx/wxwit.py CHANGED
@@ -8,7 +8,7 @@ import wx.lib.inspection as it
8
8
 
9
9
  from .controls import Icon
10
10
  from .utilus import typename
11
- from .framework import CtrlInterface, Menu, filling
11
+ from .framework import CtrlInterface, Menu
12
12
 
13
13
 
14
14
  class Inspector(it.InspectionTree, CtrlInterface):
@@ -77,22 +77,19 @@ class Inspector(it.InspectionTree, CtrlInterface):
77
77
  ## --------------------------------
78
78
 
79
79
  def SetObj(self, obj):
80
- """Called from tree.toolFrame -> SetObj.
81
-
82
- (override) Set target object.
83
- """
80
+ """Called from tree.toolFrame -> SetObj."""
84
81
  if self.target is obj:
85
82
  return
86
83
  self.target = obj
87
- item = self.FindWidgetItem(obj)
84
+ item = self.FindWidgetItem(obj) # cf. it.InspectionTree.SelectObj
88
85
  if item:
89
86
  self.EnsureVisible(item)
90
87
  self.SelectItem(item)
91
88
  elif obj:
92
- self.BuildTree(obj)
89
+ self.BuildTree(obj) # If the item for obj is missing, rebuild the tree.
93
90
 
94
91
  def GetTextForWidget(self, obj):
95
- """Returns the string to be used in the tree for a widget.
92
+ """Return the string to be used in the tree for a widget.
96
93
 
97
94
  (override) Make better object name and Id.
98
95
  """
@@ -119,11 +116,11 @@ class Inspector(it.InspectionTree, CtrlInterface):
119
116
  if obj is None:
120
117
  item = self.Selection
121
118
  if item:
122
- obj = self.GetItemData(item) # Restart
123
- self.BuildTree(obj)
124
- if not isinstance(obj, wx.Window):
119
+ obj = self.GetItemData(item) # Restart
120
+ if not isinstance(obj, (wx.Window, type(None))):
125
121
  wx.MessageBox("Cannot watch the widget.\n\n"
126
- "- {!r} is not a wx.Object.".format(obj))
122
+ "- {!r} is not a wx.Object.".format(obj),
123
+ self.__module__)
127
124
  return
128
125
  self.SetObj(obj)
129
126
  self.timer.Start(500)
@@ -137,7 +134,7 @@ class Inspector(it.InspectionTree, CtrlInterface):
137
134
  ## --------------------------------
138
135
 
139
136
  def OnTimer(self, evt):
140
- ## wnd, pt = wx.FindWindowAtPointer() # as HitTest
137
+ ## wnd, pt = wx.FindWindowAtPointer() # as HitTest
141
138
  wnd = wx.Window.FindFocus()
142
139
  if (wnd and wnd is not self.target
143
140
  and wnd not in self._noWatchList):
@@ -187,8 +184,8 @@ class Inspector(it.InspectionTree, CtrlInterface):
187
184
 
188
185
 
189
186
  def miniIcon(key, size=(16,16)):
190
- if key == 'ShowFilling':
191
- return wx.py.filling.images.getPyImage().Scale(16,16).ConvertToBitmap()
187
+ ## if key == 'ShowFilling':
188
+ ## return wx.py.filling.images.getPyImage().Scale(16,16).ConvertToBitmap()
192
189
  art = getattr(it, key)
193
190
  return art.GetImage().Scale(*size).ConvertToBitmap()
194
191
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mwxlib
3
- Version: 1.4.12
3
+ Version: 1.4.20
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
@@ -0,0 +1,28 @@
1
+ mwx/__init__.py,sha256=pS7ZG8QKRypiFFiaWAq_opBB6I_1viZ0zUMk2TbjzE0,667
2
+ mwx/bookshelf.py,sha256=XbJ9HUH5COUm-BVI7iLC7gr9Hj9l-sFjOoaCAqNS4aA,8178
3
+ mwx/controls.py,sha256=cgYEeBn1GD1s2YrDZd3jzhlACTc9IOZED_JOA8dqTJI,49914
4
+ mwx/framework.py,sha256=D1KILJNmv-eQ0HY8ayphIA_Fd9K19d6jHA5q27fp61M,77031
5
+ mwx/graphman.py,sha256=sb9Y2z5bW30arFxQnOoMhjxILNUdnAZsDh9rNbY_IPI,70037
6
+ mwx/images.py,sha256=Kkfy9QI_hMtwShSjUS4-ZpC_EkVuah_XhpBOR4wAKkM,49792
7
+ mwx/matplot2.py,sha256=U0axLQeZAR_ys5rXHykVKkvXLibnNwXS-gm-c0U2MGw,33003
8
+ mwx/matplot2g.py,sha256=foq-NdksvTV_I55UGxLzghp1YXaFfWgzTmigmnIe58E,65376
9
+ mwx/matplot2lg.py,sha256=cb0EZXivccDQu4oFj5ddSUF9pEE4f5UuFJJK2ELItww,27404
10
+ mwx/mgplt.py,sha256=KR7MWdl9J6hiiBdO0NB25Y37rP21aFdwBVsB9KZKXo8,5564
11
+ mwx/nutshell.py,sha256=sAvHbrD9V4lMaeX_h_r8e5VYnhAe47GMRaRzoNJmtV0,146629
12
+ mwx/testsuite.py,sha256=Zk75onPSEn2tf0swS3l-vIn6yTXGB7allIyvJsPHj20,1229
13
+ mwx/utilus.py,sha256=ZcKEkY2jR9pvf0bDFXyKk2Z7dDBf-NW84tDPiBlWdic,38081
14
+ mwx/wxmon.py,sha256=NIksW_CZv7Kw4dod8tWVwakO4iJuvE8hJSAcjkYfLaE,12800
15
+ mwx/wxpdb.py,sha256=aZIH7Xs-9ahDLut2P4NmvbB2zHVpI95kx4je1ophNQM,18799
16
+ mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
17
+ mwx/wxwit.py,sha256=mTH92bWw1F3ycaq4EoxVD_4hIxy2fbKZZbQg3f1ZD1Y,7350
18
+ mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
19
+ mwx/plugins/ffmpeg_view.py,sha256=-xf1Kmu4H5UZRCatqPLfstr2NbnJDZ2_xLfBLV4vczo,11001
20
+ mwx/plugins/fft_view.py,sha256=08A_Y73XirV7kXpwf-v0mUA0Hr0MOfdMXv3tvL1hvWA,2789
21
+ mwx/plugins/frame_listview.py,sha256=xH1au3lI-bZwCzmhVmvNTOHDoVQIBzH4p9_8Y36Qs5U,10380
22
+ mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
23
+ mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
24
+ mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
25
+ mwxlib-1.4.20.dist-info/METADATA,sha256=4uLVWBcmszTutWuvX_2Sv3s4nynp2J6hEXRLo1O-uhU,7382
26
+ mwxlib-1.4.20.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
27
+ mwxlib-1.4.20.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-1.4.20.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.3.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,28 +0,0 @@
1
- mwx/__init__.py,sha256=pS7ZG8QKRypiFFiaWAq_opBB6I_1viZ0zUMk2TbjzE0,667
2
- mwx/bookshelf.py,sha256=XbJ9HUH5COUm-BVI7iLC7gr9Hj9l-sFjOoaCAqNS4aA,8178
3
- mwx/controls.py,sha256=1zLWlPy0RTLHYlvxjz3ulDoTx3-uPUD3TqK7dGRA4wg,49563
4
- mwx/framework.py,sha256=oPLhLLRIoT9fudPsA6c9YzvThQdg4rJmmvShOlGMTSk,76909
5
- mwx/graphman.py,sha256=DDbmfZz29kVInzZ2NufYISd03ezKGtZdPyFZ5wDgKA0,70064
6
- mwx/images.py,sha256=Kkfy9QI_hMtwShSjUS4-ZpC_EkVuah_XhpBOR4wAKkM,49792
7
- mwx/matplot2.py,sha256=A2PbHI5UcuAvINfnm6GG7CXpbexhzvtyVLQOwcbRqnc,33015
8
- mwx/matplot2g.py,sha256=hUU1afbM6q7DQe6mU91m38odcnVo8B4e97xPvaQbshI,65282
9
- mwx/matplot2lg.py,sha256=cb0EZXivccDQu4oFj5ddSUF9pEE4f5UuFJJK2ELItww,27404
10
- mwx/mgplt.py,sha256=8mXbHpCmm7lz3XbAxOg7IVC7DaSGBEby1UfTlMl9kjk,5604
11
- mwx/nutshell.py,sha256=J50NGi_6CmCJQZEBZt8QpxAQF97y2-tRf9xw49RAyQc,143114
12
- mwx/testsuite.py,sha256=Zk75onPSEn2tf0swS3l-vIn6yTXGB7allIyvJsPHj20,1229
13
- mwx/utilus.py,sha256=ObXYWsDVn5DmjvwVQgP2HGAhrdxlDrwL7g9pMCDbU7U,38127
14
- mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
15
- mwx/wxpdb.py,sha256=ih2iLcOgYnUX849YXO4niIYue6amuoG7nWdpr-X1jFw,18839
16
- mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
17
- mwx/wxwit.py,sha256=1hHtMi2YEy2T_LnUpwdmrIdtCuvxMOFyykqnbq6jLP0,7294
18
- mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
19
- mwx/plugins/ffmpeg_view.py,sha256=r7cQPe8anAWoIn3HU_YyWRpsTJrvzji97LNIO1Gw0e0,11031
20
- mwx/plugins/fft_view.py,sha256=08A_Y73XirV7kXpwf-v0mUA0Hr0MOfdMXv3tvL1hvWA,2789
21
- mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs,10420
22
- mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
23
- mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
24
- mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
25
- mwxlib-1.4.12.dist-info/METADATA,sha256=y041f7Y-CwmHeEzr7zHuXr7Wxu3zUQhVOYBcPd9dIbE,7382
26
- mwxlib-1.4.12.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
27
- mwxlib-1.4.12.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-1.4.12.dist-info/RECORD,,