mwxlib 0.99.0__py3-none-any.whl → 1.7.13__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.
mwx/wxwit.py CHANGED
@@ -8,15 +8,15 @@ 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):
15
- """Widget inspection tool
15
+ """Widget inspection tool.
16
16
 
17
17
  Attributes:
18
- parent : shellframe
19
- target : widget to inspect
18
+ parent: shellframe
19
+ target: widget to inspect
20
20
  """
21
21
  def __init__(self, parent, *args, **kwargs):
22
22
  it.InspectionTree.__init__(self, parent, *args, **kwargs)
@@ -49,50 +49,55 @@ class Inspector(it.InspectionTree, CtrlInterface):
49
49
  self.parent.handler(self.handler.current_event, evt)
50
50
  evt.Skip()
51
51
 
52
- @self.handler.bind('f4 pressed')
53
- def highlight(evt):
52
+ @self.handler.bind('f3 pressed')
53
+ def _watchit(evt):
54
54
  if self.target:
55
- self.highlighter.HighlightCurrentItem(self)
55
+ watchit(self.target)
56
+
57
+ @self.handler.bind('f4 pressed')
58
+ def _highlight(evt):
59
+ self.highlighter.HighlightCurrentItem(self)
56
60
 
57
61
  @self.handler.bind('f5 pressed')
58
- def refresh(evt):
62
+ def _refresh(evt):
59
63
  self.BuildTree(self.target)
60
-
64
+
61
65
  def OnDestroy(self, evt):
62
66
  if evt.EventObject is self:
63
67
  self.timer.Stop()
64
68
  evt.Skip()
65
-
69
+
66
70
  def OnSetFocus(self, evt):
67
71
  title = self.__class__.__name__
68
72
  self.parent.handler('title_window', title)
69
73
  evt.Skip()
70
-
74
+
71
75
  ## --------------------------------
72
- ## InspectionTree wrapper interface
76
+ ## InspectionTree interface.
73
77
  ## --------------------------------
74
-
78
+
75
79
  def SetObj(self, obj):
76
80
  """Called from tree.toolFrame -> SetObj."""
77
81
  if self.target is obj:
78
82
  return
79
83
  self.target = obj
80
- item = self.FindWidgetItem(obj)
84
+ item = self.FindWidgetItem(obj) # cf. it.InspectionTree.SelectObj
81
85
  if item:
82
86
  self.EnsureVisible(item)
83
87
  self.SelectItem(item)
84
88
  elif obj:
85
- self.BuildTree(obj)
86
-
89
+ self.BuildTree(obj) # If the item for obj is missing, rebuild the tree.
90
+
87
91
  def GetTextForWidget(self, obj):
88
- """Returns the string to be used in the tree for a widget.
89
- (override) make better object name and Id
92
+ """Return the string to be used in the tree for a widget.
93
+
94
+ (override) Make better object name and Id.
90
95
  """
91
96
  clsname = obj.__class__.__name__
92
97
  if hasattr(obj, 'Name'):
93
98
  return "{} ({!r} {})".format(clsname, obj.Name, obj.Id)
94
99
  return clsname
95
-
100
+
96
101
  def highlight(self, obj, msec=2000):
97
102
  self.highlighter.highlightTime = msec
98
103
  if isinstance(obj, wx.Window):
@@ -101,68 +106,71 @@ class Inspector(it.InspectionTree, CtrlInterface):
101
106
  self.highlighter.HighlightSizer(obj)
102
107
  elif isinstance(obj, wx.SizerItem):
103
108
  self.highlighter.HighlightSizer(obj.Sizer)
104
-
109
+
105
110
  def set_colour(self, obj, col):
106
- self.SetObj(obj)
107
111
  item = self.FindWidgetItem(obj)
108
112
  if item:
109
113
  self.SetItemTextColour(item, col)
110
-
114
+
111
115
  def watch(self, obj=None):
112
116
  if obj is None:
113
117
  item = self.Selection
114
118
  if item:
115
- obj = self.GetItemData(item) # Restart
116
- self.BuildTree(obj)
117
- if not isinstance(obj, wx.Window):
119
+ obj = self.GetItemData(item) # Restart
120
+ if not isinstance(obj, (wx.Window, type(None))):
118
121
  wx.MessageBox("Cannot watch the widget.\n\n"
119
- "- {!r} is not a wx.Object.".format(obj))
122
+ "- {!r} is not a wx.Object.".format(obj),
123
+ self.__module__)
120
124
  return
121
125
  self.SetObj(obj)
122
126
  self.timer.Start(500)
123
-
127
+
124
128
  def unwatch(self):
125
129
  self.target = None
126
130
  self.timer.Stop()
127
-
131
+
128
132
  ## --------------------------------
129
- ## Actions on tree items
133
+ ## Actions on tree items.
130
134
  ## --------------------------------
131
-
135
+
132
136
  def OnTimer(self, evt):
133
- ## wnd, pt = wx.FindWindowAtPointer() # as HitTest
137
+ ## wnd, pt = wx.FindWindowAtPointer() # as HitTest
134
138
  wnd = wx.Window.FindFocus()
135
139
  if (wnd and wnd is not self.target
136
140
  and wnd not in self._noWatchList):
137
141
  self.SetObj(wnd)
138
142
  evt.Skip()
139
-
143
+
140
144
  def OnShow(self, evt):
141
145
  if evt.IsShown():
142
146
  if not self.built:
143
147
  self.BuildTree(self.target)
144
148
  self._noWatchList = [w for w in self._noWatchList if w]
145
149
  evt.Skip()
146
-
150
+
147
151
  def OnItemTooltip(self, evt):
148
152
  item = evt.GetItem()
149
153
  if item:
150
154
  obj = self.GetItemData(item)
151
155
  evt.SetToolTip("id=0x{:X}".format(id(obj)))
152
156
  evt.Skip()
153
-
157
+
154
158
  def OnRightDown(self, evt):
155
159
  item, flags = self.HitTest(evt.Position)
156
- if item: # and flags & (0x10 | 0x20 | 0x40 | 0x80):
160
+ if item: # and flags & (0x10 | 0x20 | 0x40 | 0x80):
157
161
  self.SelectItem(item)
158
162
  self.SetFocus()
159
163
  obj = self.target
160
164
  Menu.Popup(self, [
161
- (8, "&Filling View", miniIcon('ShowFilling'),
162
- lambda v: filling(obj),
165
+ (1, "&Dive into {!r}".format(typename(obj)), Icon('core'),
166
+ lambda v: dive(obj),
167
+ lambda v: v.Enable(obj is not None)),
168
+
169
+ (2, "&Watch event", Icon('tv'),
170
+ lambda v: watch(obj),
163
171
  lambda v: v.Enable(obj is not None)),
164
-
165
- (10, "&Inspection Tool", Icon('inspect'),
172
+ (),
173
+ (10, "&Inspection Tool\tf3", Icon('inspect'),
166
174
  lambda v: watchit(obj),
167
175
  lambda v: v.Enable(obj is not None)),
168
176
  (),
@@ -172,20 +180,12 @@ class Inspector(it.InspectionTree, CtrlInterface):
172
180
 
173
181
  (12, "Refresh\tf5", miniIcon('Refresh'),
174
182
  lambda v: self.BuildTree(obj)),
175
- (),
176
- (2, "&Watch event", Icon('tv'),
177
- lambda v: watch(obj),
178
- lambda v: v.Enable(obj is not None)),
179
-
180
- (1, "&Dive into {!r}".format(typename(obj)), Icon('core'),
181
- lambda v: dive(obj),
182
- lambda v: v.Enable(obj is not None)),
183
183
  ])
184
184
 
185
185
 
186
186
  def miniIcon(key, size=(16,16)):
187
- if key == 'ShowFilling':
188
- 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()
189
189
  art = getattr(it, key)
190
190
  return art.GetImage().Scale(*size).ConvertToBitmap()
191
191
 
@@ -214,8 +214,6 @@ def dump(widget=None):
214
214
  def watchit(widget=None, **kwargs):
215
215
  """Wx.py tool for watching widget tree structure and events."""
216
216
  from wx.lib.inspection import InspectionTool
217
- if widget:
218
- kwargs.update(locals=widget.__dict__)
219
217
  it = InspectionTool()
220
218
  it.Init(**kwargs)
221
219
  it.Show(widget)
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: mwxlib
3
- Version: 0.99.0
3
+ Version: 1.7.13
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
7
7
  Author-email: komoto@jeol.co.jp
8
8
  License: MIT
9
- Classifier: License :: OSI Approved :: MIT License
10
9
  Classifier: Programming Language :: Python :: 3
11
10
  Classifier: Programming Language :: Python :: 3.8
12
11
  Classifier: Programming Language :: Python :: 3.9
@@ -16,11 +15,19 @@ Classifier: Programming Language :: Python :: 3.12
16
15
  Classifier: Topic :: Scientific/Engineering :: Image Processing
17
16
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
17
  Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: wxpython >=4.2.0
18
+ Requires-Dist: wxpython>=4.2.0
21
19
  Requires-Dist: matplotlib
22
20
  Requires-Dist: opencv-python
23
21
  Requires-Dist: scipy
22
+ Dynamic: author
23
+ Dynamic: author-email
24
+ Dynamic: classifier
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: license
29
+ Dynamic: requires-dist
30
+ Dynamic: summary
24
31
 
25
32
  # mwxlib
26
33
 
@@ -39,22 +46,17 @@ These instructions will get you a copy of the project up and running on your loc
39
46
  - ~~Python 2.7~~ (PY2 support has ended since 0.50)
40
47
  - ~~Python 3.5~~ (PY35 support has ended since 0.70)
41
48
  - ~~Python 3.7~~ (PY37 support has ended since 0.80)
42
- - Python 3.8 -- 3.9 (deprecated since 0.90)
43
- - wxpython >= 4.1.1
49
+ - ~~Python 3.8 -- 3.9~~ (Deprecated since 0.90)
50
+ - Python 3.10 -- 3.12
51
+ - wxpython >= 4.2.2 (recommended)
44
52
  - numpy
45
53
  - pillow
46
54
  - matplotlib
47
55
  - opencv-python
48
- - Python 3.10 -- 3.11
49
- - wxpython >= 4.2.1
50
- - numpy
51
- - pillow
52
- - matplotlib
53
- - opencv-python
54
- - Python 3.12
55
- - A version of wxpython for PY312 has not yet released on PyPi.
56
- * You can download the snapshot from https://wxpython.org/Phoenix/snapshot-builds/,
57
- * or the latest snapshot from Azure Pipelines https://alldunn.visualstudio.com/wxPython-CI/_build?definitionId=2&_a=summary
56
+ - Python 3.13
57
+ - There are some bugs in mwxlib that remain unfixed.
58
+ - A version of wxpython for PY313 has released on PyPi.
59
+ * You can also download the snapshot from https://wxpython.org/Phoenix/snapshot-builds/,
58
60
 
59
61
 
60
62
  ### Installing
@@ -0,0 +1,28 @@
1
+ mwx/__init__.py,sha256=gfhefIJIV_RbXicmCLGsyX01thIZXwxQlzIH32lMtrc,715
2
+ mwx/bookshelf.py,sha256=edDdYtrwfk6xiimj-Mw4Wwfg-xlUkOKoDId515pbdQ0,8555
3
+ mwx/controls.py,sha256=aJpti8JSfm9eh57SZ3yWQqD4-hGzA2yAQD0YPc6RP84,49951
4
+ mwx/framework.py,sha256=ROmUTB1jAYv6sedjcvVrVYbWFS_pVp2SYyC1nw7spLI,76951
5
+ mwx/graphman.py,sha256=AXi8OtqWBokLGv2Q_oRkIzCzJnCRLlvVnntxTwyBimc,71538
6
+ mwx/images.py,sha256=Kkfy9QI_hMtwShSjUS4-ZpC_EkVuah_XhpBOR4wAKkM,49792
7
+ mwx/matplot2.py,sha256=5NWyBnkZmEKiAT2zwZrOnQwKvDs-rTxVVGaSQc4V2f4,32822
8
+ mwx/matplot2g.py,sha256=lHnjqGrpprq3egQdi448f6mp2ZS5nnkGw26edjM-qVo,65997
9
+ mwx/matplot2lg.py,sha256=m3oDmgE5phorTt0qWcOr6vueFHmQHJqlR4oTvJtte3E,27821
10
+ mwx/mgplt.py,sha256=wrBeK5neOi1tX9llKlKHhVVrSyoent7y6wIuW2fLZ5Y,5522
11
+ mwx/nutshell.py,sha256=BAvZzCG9rnFZFf1wtEMJsZjRoZhH2fRlfqih4tbPQ5U,147318
12
+ mwx/testsuite.py,sha256=pBB7ZNicI_thrg6LmNPgUOgfMWwRoAaYWN1nFy6t6S4,790
13
+ mwx/utilus.py,sha256=dABL7NYIr-oEp-QXFJyy919_Rv8eKbxJarpoQ47h794,39954
14
+ mwx/wxmon.py,sha256=1PtG1N72mPIU1EjHYGGiQQTrjvIDo-qJRcBFuVlZNdM,12738
15
+ mwx/wxpdb.py,sha256=miLf3tuufnyvow3xW5kUchpeSd77xN9O-eW9-sDmElg,18680
16
+ mwx/wxwil.py,sha256=z82sHqqkrIbtxmuDJkxOCkA9EAG8Yt_7AhMGr_MiAI0,5370
17
+ mwx/wxwit.py,sha256=WDv41JntE3vX4mbyk0Cu-75CNkRMOB8bNSS_r27DdEw,7286
18
+ mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
19
+ mwx/plugins/ffmpeg_view.py,sha256=GBtURfa-_kG_Osumi2qJLqIWdAp2cxizlgp0FMBYuZk,10913
20
+ mwx/plugins/fft_view.py,sha256=u2TMMM7rHlvvhU412fVUHcrGWslZcFL9y-iBbjIrhgQ,2728
21
+ mwx/plugins/frame_listview.py,sha256=jXMtyCJQVuSSmi5A4BKSmXDzPRJRAQiEtRgKN2NS37I,10527
22
+ mwx/plugins/line_profile.py,sha256=zT9p22YCkxjGtoLwVDcfqW9M80Xn2qBEt096qq7N9QQ,815
23
+ mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
24
+ mwx/py/filling.py,sha256=98AmfxCXuk-hOUPiG93oo-PAlVtZ-92wqFl67eDm_RA,16875
25
+ mwxlib-1.7.13.dist-info/METADATA,sha256=ggNj8WGipx4ImpbgArfUbn9AfRIgeG8NQCGrZQy1I3I,7382
26
+ mwxlib-1.7.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ mwxlib-1.7.13.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-1.7.13.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Kazuya O'moto
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,28 +0,0 @@
1
- mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
2
- mwx/bookshelf.py,sha256=so-xSLq08sMlJBErTxOaDoKUAMa_g1CkIP2pNnff68c,5607
3
- mwx/controls.py,sha256=WYd0nbpXL7eiE5E7l7jG49pm_u4mfgHI4c1dop4lsMM,48103
4
- mwx/framework.py,sha256=28_DX0eYwintdgBaO-06ds0NGevwXu_UdYmXjqTy4os,75587
5
- mwx/graphman.py,sha256=N34F5GXpN3ZEMfUIOswlM-OCIB1KObC6X1NTq_Qc2dk,69973
6
- mwx/images.py,sha256=_-Eh3xF7Khu42ivkYp97NXIzSNGbjcidqtWjZQFGtqE,47827
7
- mwx/matplot2.py,sha256=xCJ_ZzdDEWmzctpPaOrzTnwXyHINP4nfFHweoTZa6ug,32899
8
- mwx/matplot2g.py,sha256=gCXa8X1MEMP7n_mG73h3SkWKuNZOfjVKUTWNRXXK11c,64310
9
- mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
10
- mwx/mgplt.py,sha256=0WJ1RN_Y0a4Y3rz1C_Lx-WhumtOMdb1N49guX9aZZ_o,5602
11
- mwx/nutshell.py,sha256=xoHTyWZ46geGy3u4aU8k8_-mr520EdGcvuQRO4TBU_A,140715
12
- mwx/utilus.py,sha256=B76pDg6_kW8FMNdQ6xO0Bwy4KJ0laY98Gg6N3iqV7c8,37325
13
- mwx/wxmon.py,sha256=Pq8XXigM_isJd80yiqG18iRVdArJpsePpxfnZOkk-Uw,12573
14
- mwx/wxpdb.py,sha256=lLowkkAgMhPFHAfklD7wZHq0qbSMjRxnBFtSajmVgME,19133
15
- mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
16
- mwx/wxwit.py,sha256=ifxMwdIz-QhDEr8vyAztToF8VVSxKNXlq4Ap1awBZvo,7362
17
- mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
18
- mwx/plugins/ffmpeg_view.py,sha256=Mmen75o6LyA5QEHB8sCFSPCIPvEaALKzrgomym3fGAU,10721
19
- mwx/plugins/fft_view.py,sha256=xxTDD-_z4l18u4t2ybPB3xAMIslJmJ0gQlTxEqJUhNI,2782
20
- mwx/plugins/frame_listview.py,sha256=yEYPCdLHLSMTJwTv6iYAh3Lo4lJvYfp5BxTLP3FhW9Y,10421
21
- mwx/plugins/line_profile.py,sha256=--9NIc3x5EfRB3L59JvD7rzENQHyiYfu7wWJo6AuMkA,820
22
- mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
23
- mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
24
- mwxlib-0.99.0.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
- mwxlib-0.99.0.dist-info/METADATA,sha256=Ix7YJKkft0nZZfhvPm-XOgN65HwIZF3T6asdSvhsCP0,7411
26
- mwxlib-0.99.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
27
- mwxlib-0.99.0.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-0.99.0.dist-info/RECORD,,