mwxlib 1.7.13__py3-none-any.whl → 1.8.0__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/bookshelf.py +12 -12
- mwx/controls.py +22 -22
- mwx/framework.py +58 -55
- mwx/graphman.py +87 -74
- mwx/matplot2.py +40 -40
- mwx/matplot2g.py +197 -219
- mwx/matplot2lg.py +32 -32
- mwx/nutshell.py +94 -114
- mwx/plugins/ffmpeg_view.py +40 -33
- mwx/plugins/frame_listview.py +21 -31
- mwx/py/filling.py +4 -6
- mwx/utilus.py +13 -11
- mwx/wxmon.py +7 -9
- mwx/wxpdb.py +2 -1
- mwx/wxwil.py +2 -1
- mwx/wxwit.py +7 -11
- {mwxlib-1.7.13.dist-info → mwxlib-1.8.0.dist-info}/METADATA +1 -1
- mwxlib-1.8.0.dist-info/RECORD +28 -0
- mwxlib-1.7.13.dist-info/RECORD +0 -28
- {mwxlib-1.7.13.dist-info → mwxlib-1.8.0.dist-info}/WHEEL +0 -0
- {mwxlib-1.7.13.dist-info → mwxlib-1.8.0.dist-info}/top_level.txt +0 -0
mwx/plugins/ffmpeg_view.py
CHANGED
|
@@ -7,9 +7,9 @@ import os
|
|
|
7
7
|
import wx
|
|
8
8
|
import wx.media
|
|
9
9
|
|
|
10
|
-
from mwx.framework import _F
|
|
10
|
+
from mwx.framework import _F
|
|
11
11
|
from mwx.graphman import Layer
|
|
12
|
-
from mwx.controls import LParam, Icon, Button, TextBox
|
|
12
|
+
from mwx.controls import Param, LParam, Icon, Button, TextBox
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def read_info(path):
|
|
@@ -100,10 +100,13 @@ class Plugin(Layer):
|
|
|
100
100
|
handler=self.set_offset,
|
|
101
101
|
updater=self.get_offset,
|
|
102
102
|
)
|
|
103
|
-
self.crop = TextBox(self, icon="cut", size=(
|
|
103
|
+
self.crop = TextBox(self, icon="cut", size=(140,-1),
|
|
104
104
|
handler=self.set_crop,
|
|
105
105
|
updater=self.get_crop,
|
|
106
106
|
)
|
|
107
|
+
self.rate = Param("rate", (1/8,1/4,1/2,1,2,4,8),
|
|
108
|
+
handler=self.set_rate,
|
|
109
|
+
)
|
|
107
110
|
|
|
108
111
|
self.snp = Button(self, handler=self.snapshot, icon='clip')
|
|
109
112
|
self.exp = Button(self, handler=self.export, icon='save')
|
|
@@ -113,8 +116,8 @@ class Plugin(Layer):
|
|
|
113
116
|
|
|
114
117
|
self.layout((self.mc,), expand=2)
|
|
115
118
|
self.layout((self.ss, self.to, self.rw, self.fw,
|
|
116
|
-
self.snp, self.crop, self.exp),
|
|
117
|
-
expand=0, row=
|
|
119
|
+
self.snp, self.crop, self.rate, self.exp),
|
|
120
|
+
expand=0, row=8, type='vspin', style='button', lw=32, cw=-1, tw=64)
|
|
118
121
|
|
|
119
122
|
self.menu[0:5] = [
|
|
120
123
|
(1, "&Load file", Icon('open'),
|
|
@@ -128,25 +131,23 @@ class Plugin(Layer):
|
|
|
128
131
|
|
|
129
132
|
self.parent.handler.bind("unknown_format", self.load_media)
|
|
130
133
|
|
|
131
|
-
self.handler.update({
|
|
132
|
-
|
|
134
|
+
self.handler.update({ # DNA<ffmpeg_viewer>
|
|
135
|
+
None : {
|
|
136
|
+
'C-left pressed' : (None, _F(self.seekd, -1000)),
|
|
137
|
+
'C-right pressed' : (None, _F(self.seekd, 1000)),
|
|
138
|
+
},
|
|
139
|
+
0 : { # MEDIASTATE_STOPPED
|
|
133
140
|
'play' : (2, ),
|
|
134
141
|
'space pressed' : (2, _F(self.mc.Play)),
|
|
135
|
-
'left pressed' : (0, _F(self.seekd, -1000)),
|
|
136
|
-
'right pressed' : (0, _F(self.seekd, 1000)),
|
|
137
142
|
},
|
|
138
|
-
1 : {
|
|
143
|
+
1 : { # MEDIASTATE_PAUSED
|
|
139
144
|
'stop' : (0, ),
|
|
140
145
|
'space pressed' : (2, _F(self.mc.Play)),
|
|
141
|
-
'left pressed' : (1, _F(self.seekd, -1000)),
|
|
142
|
-
'right pressed' : (1, _F(self.seekd, 1000)),
|
|
143
146
|
},
|
|
144
|
-
2 : {
|
|
147
|
+
2 : { # MEDIASTATE_PLAYING
|
|
145
148
|
'stop' : (0, ),
|
|
146
149
|
'pause' : (1, ),
|
|
147
150
|
'space pressed' : (1, _F(self.mc.Pause)),
|
|
148
|
-
'left pressed' : (2, _F(self.seekd, -1000)),
|
|
149
|
-
'right pressed' : (2, _F(self.seekd, 1000)),
|
|
150
151
|
},
|
|
151
152
|
})
|
|
152
153
|
|
|
@@ -203,7 +204,10 @@ class Plugin(Layer):
|
|
|
203
204
|
self.message(f"Failed to load file {path!r}.")
|
|
204
205
|
return False
|
|
205
206
|
|
|
206
|
-
|
|
207
|
+
## Correction for seek position. ▲理由は不明 (WMP10 backend only?)
|
|
208
|
+
@property
|
|
209
|
+
def DELTA(self):
|
|
210
|
+
return int(1000 / self.mc.PlaybackRate)
|
|
207
211
|
|
|
208
212
|
def set_offset(self, tc):
|
|
209
213
|
"""Set offset value by referring to ss/to value."""
|
|
@@ -217,35 +221,38 @@ class Plugin(Layer):
|
|
|
217
221
|
|
|
218
222
|
def set_crop(self):
|
|
219
223
|
"""Set crop area (W:H:Left:Top) to ROI."""
|
|
220
|
-
if not self._path:
|
|
221
|
-
return
|
|
222
224
|
frame = self.graph.frame
|
|
223
225
|
if frame:
|
|
224
226
|
try:
|
|
225
|
-
w, h, xo, yo =
|
|
226
|
-
xo -= 0.5 # Correction with half-pixel
|
|
227
|
-
yo -= 0.5 #
|
|
227
|
+
w, h, xo, yo = map(float, self.crop.Value.split(':'))
|
|
228
|
+
xo -= 0.5 # Correction with half-pixel offset.
|
|
229
|
+
yo -= 0.5 # Select left-top corner position.
|
|
228
230
|
nx = xo, xo+w
|
|
229
231
|
ny = yo, yo+h
|
|
230
232
|
frame.region = frame.xyfrompixel(nx, ny)
|
|
231
|
-
except Exception:
|
|
232
|
-
self.message("Failed to evaluate crop text
|
|
233
|
+
except Exception as e:
|
|
234
|
+
self.message("Failed to evaluate crop text;", e)
|
|
233
235
|
|
|
234
236
|
def get_crop(self):
|
|
235
237
|
"""Get crop area (W:H:Left:Top) from ROI."""
|
|
236
|
-
if not self._path:
|
|
237
|
-
return
|
|
238
|
-
crop = ''
|
|
239
238
|
frame = self.graph.frame
|
|
240
239
|
if frame:
|
|
241
|
-
nx, ny = frame.xytopixel(
|
|
240
|
+
nx, ny = frame.xytopixel(frame.region)
|
|
242
241
|
if nx.size:
|
|
243
|
-
xo,
|
|
244
|
-
|
|
245
|
-
crop = "{}:{}:{}:{}"
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
242
|
+
xo, xp = nx
|
|
243
|
+
yp, yo = ny
|
|
244
|
+
self.crop.Value = f"{xp-xo}:{yp-yo}:{xo}:{yo}" # (W:H:left:top)
|
|
245
|
+
return
|
|
246
|
+
if self._path:
|
|
247
|
+
self.crop.Value = "{}:{}:0:0".format(*self.video_size)
|
|
248
|
+
|
|
249
|
+
def set_rate(self, rate):
|
|
250
|
+
if self._path:
|
|
251
|
+
self.mc.PlaybackRate = rate
|
|
252
|
+
|
|
253
|
+
def get_rate(self):
|
|
254
|
+
if self._path:
|
|
255
|
+
return self.mc.PlaybackRate
|
|
249
256
|
|
|
250
257
|
def seekto(self, offset):
|
|
251
258
|
"""Seek position with offset [ms] from the `to` position."""
|
mwx/plugins/frame_listview.py
CHANGED
|
@@ -6,7 +6,7 @@ import wx
|
|
|
6
6
|
from wx import aui
|
|
7
7
|
from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin
|
|
8
8
|
|
|
9
|
-
from mwx.framework import CtrlInterface, Menu, StatusBar
|
|
9
|
+
from mwx.framework import CtrlInterface, Menu, StatusBar, pack
|
|
10
10
|
from mwx.controls import Icon, Clipboard
|
|
11
11
|
from mwx.graphman import Layer
|
|
12
12
|
|
|
@@ -51,7 +51,7 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
51
51
|
|
|
52
52
|
self.__dir = True
|
|
53
53
|
|
|
54
|
-
_alist = (
|
|
54
|
+
_alist = ( # assoc-list of column names
|
|
55
55
|
("id", 45),
|
|
56
56
|
("name", 160),
|
|
57
57
|
("shape", 90),
|
|
@@ -67,15 +67,12 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
67
67
|
self.InsertItem(j, str(j))
|
|
68
68
|
self.UpdateInfo(frame) # update all --> 計算が入ると時間がかかる
|
|
69
69
|
|
|
70
|
-
self.handler.update({
|
|
70
|
+
self.handler.update({ # DNA<frame_listview>
|
|
71
71
|
0 : {
|
|
72
72
|
'Lbutton dblclick' : (0, self.OnShowItems), # -> frame_shown
|
|
73
73
|
'enter pressed' : (0, self.OnShowItems), # -> frame_shown
|
|
74
74
|
'delete pressed' : (0, self.OnRemoveItems), # -> frame_removed/shown
|
|
75
75
|
'C-a pressed' : (0, self.OnSelectAllItems),
|
|
76
|
-
'C-o pressed' : (0, self.OnLoadItems),
|
|
77
|
-
'C-s pressed' : (0, self.OnSaveItems),
|
|
78
|
-
'C-S-s pressed' : (0, self.OnSaveItems),
|
|
79
76
|
'C-c pressed' : (0, self.OnCopyInfo),
|
|
80
77
|
'C-l pressed' : (0, self.OnEditLocalUnit),
|
|
81
78
|
'f2 pressed' : (0, self.OnEditAnnotation),
|
|
@@ -88,14 +85,14 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
88
85
|
self.Bind(wx.EVT_LIST_COL_CLICK, self.OnSortItems)
|
|
89
86
|
self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected)
|
|
90
87
|
|
|
91
|
-
self.context = {
|
|
88
|
+
self.context = { # DNA<GraphPlot>
|
|
92
89
|
None: {
|
|
93
|
-
'frame_shown' : [
|
|
94
|
-
'frame_hidden' : [
|
|
95
|
-
'frame_loaded' : [
|
|
96
|
-
'frame_removed' : [
|
|
97
|
-
'frame_modified' : [
|
|
98
|
-
'frame_updated' : [
|
|
90
|
+
'frame_shown' : [None, self.on_frame_shown],
|
|
91
|
+
'frame_hidden' : [None, self.on_frame_hidden],
|
|
92
|
+
'frame_loaded' : [None, self.on_frame_loaded],
|
|
93
|
+
'frame_removed' : [None, self.on_frames_removed],
|
|
94
|
+
'frame_modified' : [None, self.UpdateInfo],
|
|
95
|
+
'frame_updated' : [None, self.UpdateInfo],
|
|
99
96
|
}
|
|
100
97
|
}
|
|
101
98
|
self.Target.handler.append(self.context)
|
|
@@ -132,8 +129,7 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
132
129
|
j = frame.index
|
|
133
130
|
for k, v in enumerate(ls):
|
|
134
131
|
self.SetItem(j, k, v)
|
|
135
|
-
|
|
136
|
-
self.CheckItem(j)
|
|
132
|
+
self.CheckItem(j, frame.pathname is not None)
|
|
137
133
|
|
|
138
134
|
def OnShowItems(self, evt):
|
|
139
135
|
self.Target.select(self.focused_item)
|
|
@@ -141,7 +137,7 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
141
137
|
def OnRemoveItems(self, evt):
|
|
142
138
|
del self.Target[self.selected_items]
|
|
143
139
|
|
|
144
|
-
def OnSortItems(self, evt):
|
|
140
|
+
def OnSortItems(self, evt): # <wx._controls.ListEvent>
|
|
145
141
|
col = evt.Column
|
|
146
142
|
if col == 0: # reverse the first column
|
|
147
143
|
self.__dir = False
|
|
@@ -171,24 +167,18 @@ class CheckList(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
171
167
|
for j in range(self.ItemCount):
|
|
172
168
|
self.Select(j)
|
|
173
169
|
|
|
174
|
-
def OnLoadItems(self, evt):
|
|
175
|
-
self.parent.parent.load_index(view=self.Target)
|
|
176
|
-
|
|
177
|
-
def OnSaveItems(self, evt):
|
|
178
|
-
selected_frames = [self.Target.all_frames[j] for j in self.selected_items]
|
|
179
|
-
if selected_frames:
|
|
180
|
-
self.parent.message("Exporting {} frames.".format(len(selected_frames)))
|
|
181
|
-
self.parent.parent.save_index(frames=selected_frames)
|
|
182
|
-
else:
|
|
183
|
-
self.parent.message("No frame selected.")
|
|
184
|
-
|
|
185
170
|
def OnCopyInfo(self, evt):
|
|
186
171
|
selected_frames = [self.Target.all_frames[j] for j in self.selected_items]
|
|
187
172
|
if selected_frames:
|
|
188
|
-
text =
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
173
|
+
text = '\n'.join(pformat(frame.attributes, sort_dicts=0) # ALL attributes
|
|
174
|
+
for frame in selected_frames)
|
|
175
|
+
Clipboard.write(text)
|
|
176
|
+
with wx.Dialog(self,
|
|
177
|
+
title="Frame Properties",
|
|
178
|
+
style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER) as dlg:
|
|
179
|
+
textctrl = wx.TextCtrl(dlg, value=text, style=wx.TE_MULTILINE|wx.TE_READONLY)
|
|
180
|
+
dlg.SetSizer(pack(dlg, [textctrl], style=(1, wx.ALL | wx.EXPAND, 10)))
|
|
181
|
+
dlg.ShowModal()
|
|
192
182
|
else:
|
|
193
183
|
self.parent.message("No frame selected.")
|
|
194
184
|
|
mwx/py/filling.py
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
the local namespace or any object.
|
|
4
4
|
"""
|
|
5
5
|
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
|
|
6
|
-
|
|
7
|
-
# Tags: py3-port
|
|
6
|
+
# Modified by Kazuya O'moto <komoto@jeol.co.jp>
|
|
8
7
|
|
|
9
8
|
import wx
|
|
10
9
|
import six
|
|
@@ -18,8 +17,8 @@ import types
|
|
|
18
17
|
import warnings
|
|
19
18
|
|
|
20
19
|
|
|
21
|
-
COMMONTYPES = [getattr(types, t) for t in dir(types)
|
|
22
|
-
if not t.startswith('_')
|
|
20
|
+
COMMONTYPES = [getattr(types, t) for t in dir(types)
|
|
21
|
+
if not t.startswith('_')
|
|
23
22
|
and t not in ('ClassType', 'InstanceType', 'ModuleType')]
|
|
24
23
|
|
|
25
24
|
DOCTYPES = ('BuiltinFunctionType', 'BuiltinMethodType', 'ClassType',
|
|
@@ -27,7 +26,7 @@ DOCTYPES = ('BuiltinFunctionType', 'BuiltinMethodType', 'ClassType',
|
|
|
27
26
|
'LambdaType', 'MethodType', 'ModuleType',
|
|
28
27
|
'UnboundMethodType', 'method-wrapper')
|
|
29
28
|
|
|
30
|
-
SIMPLETYPES = [getattr(types, t) for t in dir(types)
|
|
29
|
+
SIMPLETYPES = [getattr(types, t) for t in dir(types)
|
|
31
30
|
if not t.startswith('_') and t not in DOCTYPES]
|
|
32
31
|
|
|
33
32
|
#del t
|
|
@@ -404,7 +403,6 @@ class Filling(wx.SplitterWindow):
|
|
|
404
403
|
config.WriteInt('View/Zoom/Filling', self.text.GetZoom())
|
|
405
404
|
|
|
406
405
|
|
|
407
|
-
|
|
408
406
|
class FillingFrame(wx.Frame):
|
|
409
407
|
"""Frame containing the namespace tree component."""
|
|
410
408
|
|
mwx/utilus.py
CHANGED
|
@@ -81,39 +81,39 @@ def subclass(*types):
|
|
|
81
81
|
|
|
82
82
|
def _Not(p):
|
|
83
83
|
## return lambda v: not p(v)
|
|
84
|
-
if isinstance(p, type):
|
|
85
|
-
p = instance(p)
|
|
86
84
|
def _pred(v):
|
|
87
85
|
return not p(v)
|
|
86
|
+
if isinstance(p, type):
|
|
87
|
+
p = instance(p)
|
|
88
88
|
_pred.__name__ = "not {}".format(p.__name__)
|
|
89
89
|
return _pred
|
|
90
90
|
|
|
91
91
|
|
|
92
92
|
def _And(p, q):
|
|
93
93
|
## return lambda v: p(v) and q(v)
|
|
94
|
+
def _pred(v):
|
|
95
|
+
return p(v) and q(v)
|
|
94
96
|
if isinstance(p, type):
|
|
95
97
|
p = instance(p)
|
|
96
98
|
if isinstance(q, type):
|
|
97
99
|
q = instance(q)
|
|
98
|
-
def _pred(v):
|
|
99
|
-
return p(v) and q(v)
|
|
100
100
|
_pred.__name__ = "{} and {}".format(p.__name__, q.__name__)
|
|
101
101
|
return _pred
|
|
102
102
|
|
|
103
103
|
|
|
104
104
|
def _Or(p, q):
|
|
105
105
|
## return lambda v: p(v) or q(v)
|
|
106
|
+
def _pred(v):
|
|
107
|
+
return p(v) or q(v)
|
|
106
108
|
if isinstance(p, type):
|
|
107
109
|
p = instance(p)
|
|
108
110
|
if isinstance(q, type):
|
|
109
111
|
q = instance(q)
|
|
110
|
-
def _pred(v):
|
|
111
|
-
return p(v) or q(v)
|
|
112
112
|
_pred.__name__ = "{} or {}".format(p.__name__, q.__name__)
|
|
113
113
|
return _pred
|
|
114
114
|
|
|
115
115
|
|
|
116
|
-
def
|
|
116
|
+
def _Predicate(text, locals):
|
|
117
117
|
tokens = [x for x in split_words(text.strip()) if not x.isspace()]
|
|
118
118
|
j = 0
|
|
119
119
|
while j < len(tokens):
|
|
@@ -144,7 +144,7 @@ def apropos(obj, rexpr='', ignorecase=True, alias=None, pred=None, locals=None):
|
|
|
144
144
|
name = alias or typename(obj)
|
|
145
145
|
|
|
146
146
|
if isinstance(pred, str):
|
|
147
|
-
pred =
|
|
147
|
+
pred = _Predicate(pred, locals)
|
|
148
148
|
|
|
149
149
|
if isinstance(pred, type):
|
|
150
150
|
pred = instance(pred)
|
|
@@ -163,7 +163,7 @@ def apropos(obj, rexpr='', ignorecase=True, alias=None, pred=None, locals=None):
|
|
|
163
163
|
try:
|
|
164
164
|
p = re.compile(rexpr, re.I if ignorecase else 0)
|
|
165
165
|
except re.error as e:
|
|
166
|
-
print("- re:miss compilation
|
|
166
|
+
print("- re:miss compilation;", e)
|
|
167
167
|
else:
|
|
168
168
|
keys = sorted(filter(p.search, dir(obj)), key=lambda s: s.upper())
|
|
169
169
|
n = 0
|
|
@@ -840,7 +840,9 @@ class FSM(dict):
|
|
|
840
840
|
if action is None:
|
|
841
841
|
return lambda f: self.bind(event, f, state, state2)
|
|
842
842
|
|
|
843
|
-
if action
|
|
843
|
+
if action in transaction:
|
|
844
|
+
warn(f"- FSM duplicate transaction ({state!r} : {event!r}).")
|
|
845
|
+
else:
|
|
844
846
|
try:
|
|
845
847
|
transaction.append(action)
|
|
846
848
|
except AttributeError:
|
|
@@ -1029,7 +1031,7 @@ def get_fullargspec(f):
|
|
|
1029
1031
|
varkwargs = None # <**kwargs> 4:VAR_KEYWORD
|
|
1030
1032
|
defaults = {} #
|
|
1031
1033
|
kwonlyargs = [] # <after *> 3:KEYWORD_ONLY
|
|
1032
|
-
kwonlydefaults = {}
|
|
1034
|
+
kwonlydefaults = {}
|
|
1033
1035
|
try:
|
|
1034
1036
|
sig = inspect.signature(f)
|
|
1035
1037
|
for k, v in sig.parameters.items():
|
mwx/wxmon.py
CHANGED
|
@@ -46,8 +46,8 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
46
46
|
self.InsertColumn(k, header, width=w)
|
|
47
47
|
|
|
48
48
|
self.Bind(wx.EVT_LIST_COL_CLICK, self.OnSortItems)
|
|
49
|
+
self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnItemActivated)
|
|
49
50
|
self.Bind(wx.EVT_CONTEXT_MENU, self.OnContextMenu)
|
|
50
|
-
self.Bind(wx.EVT_LEFT_DCLICK, self.OnItemDClick)
|
|
51
51
|
self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
|
|
52
52
|
self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)
|
|
53
53
|
|
|
@@ -181,7 +181,7 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
181
181
|
except Exception:
|
|
182
182
|
attribs = '' # Failed to get event attributes; possibly <BdbQuit>.
|
|
183
183
|
data = self.__items
|
|
184
|
-
for
|
|
184
|
+
for item in data:
|
|
185
185
|
if item[0] == event:
|
|
186
186
|
stamp = item[2] + 1
|
|
187
187
|
item[1:] = [name, stamp, source, attribs]
|
|
@@ -219,6 +219,7 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
219
219
|
def blink(self, i):
|
|
220
220
|
if self.GetItemBackgroundColour(i) != wx.Colour('yellow'):
|
|
221
221
|
self.SetItemBackgroundColour(i, "yellow")
|
|
222
|
+
|
|
222
223
|
def _reset_color():
|
|
223
224
|
if self and i < self.ItemCount:
|
|
224
225
|
self.SetItemBackgroundColour(i, 'white')
|
|
@@ -234,7 +235,7 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
234
235
|
text += "{}\t{}\n{}\n\n".format(event, name, attribs)
|
|
235
236
|
Clipboard.write(text[:-1])
|
|
236
237
|
|
|
237
|
-
def OnSortItems(self, evt):
|
|
238
|
+
def OnSortItems(self, evt): # <wx._controls.ListEvent>
|
|
238
239
|
n = self.ItemCount
|
|
239
240
|
if n < 2:
|
|
240
241
|
return
|
|
@@ -260,12 +261,9 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
260
261
|
if item == fi:
|
|
261
262
|
self.Focus(i)
|
|
262
263
|
|
|
263
|
-
def
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
item = self.__items[i]
|
|
267
|
-
wx.CallAfter(wx.TipWindow, self, item[-1], 512) # attribs
|
|
268
|
-
evt.Skip()
|
|
264
|
+
def OnItemActivated(self, evt): # <wx._controls.ListEvent>
|
|
265
|
+
item = self.__items[evt.Index]
|
|
266
|
+
wx.CallAfter(wx.TipWindow, self, item[-1], 512) # attribs
|
|
269
267
|
|
|
270
268
|
def OnContextMenu(self, evt):
|
|
271
269
|
obj = self.target
|
mwx/wxpdb.py
CHANGED
|
@@ -111,7 +111,7 @@ class Debugger(Pdb):
|
|
|
111
111
|
"""Fork events to the parent."""
|
|
112
112
|
self.parent.handler(self.handler.current_event, evt)
|
|
113
113
|
|
|
114
|
-
self.__handler = FSM({
|
|
114
|
+
self.__handler = FSM({ # DNA<Debugger>
|
|
115
115
|
0 : {
|
|
116
116
|
'debug_begin' : (1, self.on_debug_begin, dispatch),
|
|
117
117
|
'trace_begin' : (2, dispatch),
|
|
@@ -336,6 +336,7 @@ class Debugger(Pdb):
|
|
|
336
336
|
"""Called in preloop (cmdloop)."""
|
|
337
337
|
shell = self.interactive_shell
|
|
338
338
|
self.__cpos = shell.cpos
|
|
339
|
+
|
|
339
340
|
def _next():
|
|
340
341
|
shell.goto_char(shell.eolc)
|
|
341
342
|
pos = self.__cpos
|
mwx/wxwil.py
CHANGED
|
@@ -129,6 +129,7 @@ class LocalsWatcher(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
129
129
|
def blink(self, i):
|
|
130
130
|
if self.GetItemBackgroundColour(i) != wx.Colour('yellow'):
|
|
131
131
|
self.SetItemBackgroundColour(i, "yellow")
|
|
132
|
+
|
|
132
133
|
def _reset_color():
|
|
133
134
|
if self and i < self.ItemCount:
|
|
134
135
|
self.SetItemBackgroundColour(i, 'white')
|
|
@@ -144,7 +145,7 @@ class LocalsWatcher(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
144
145
|
text += "{} = {}\n".format(key, vstr)
|
|
145
146
|
Clipboard.write(text)
|
|
146
147
|
|
|
147
|
-
def OnSortItems(self, evt):
|
|
148
|
+
def OnSortItems(self, evt): # <wx._controls.ListEvent>
|
|
148
149
|
n = self.ItemCount
|
|
149
150
|
if n < 2:
|
|
150
151
|
return
|
mwx/wxwit.py
CHANGED
|
@@ -33,7 +33,7 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
33
33
|
self.TopLevelParent]
|
|
34
34
|
|
|
35
35
|
self.Bind(wx.EVT_TREE_ITEM_GETTOOLTIP, self.OnItemTooltip)
|
|
36
|
-
self.Bind(wx.
|
|
36
|
+
self.Bind(wx.EVT_TREE_ITEM_RIGHT_CLICK, self.OnItemRightClick)
|
|
37
37
|
self.Bind(wx.EVT_SHOW, self.OnShow)
|
|
38
38
|
self.Bind(wx.EVT_TIMER, self.OnTimer)
|
|
39
39
|
self.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
|
|
@@ -148,18 +148,13 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
148
148
|
self._noWatchList = [w for w in self._noWatchList if w]
|
|
149
149
|
evt.Skip()
|
|
150
150
|
|
|
151
|
-
def OnItemTooltip(self, evt):
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
obj = self.GetItemData(item)
|
|
155
|
-
evt.SetToolTip("id=0x{:X}".format(id(obj)))
|
|
151
|
+
def OnItemTooltip(self, evt): # <wx._core.TreeEvent>
|
|
152
|
+
obj = self.GetItemData(evt.Item)
|
|
153
|
+
evt.SetToolTip("id=0x{:X}".format(id(obj)))
|
|
156
154
|
evt.Skip()
|
|
157
155
|
|
|
158
|
-
def
|
|
159
|
-
|
|
160
|
-
if item: # and flags & (0x10 | 0x20 | 0x40 | 0x80):
|
|
161
|
-
self.SelectItem(item)
|
|
162
|
-
self.SetFocus()
|
|
156
|
+
def OnItemRightClick(self, evt): # <wx._core.TreeEvent>
|
|
157
|
+
self.SelectItem(evt.Item)
|
|
163
158
|
obj = self.target
|
|
164
159
|
Menu.Popup(self, [
|
|
165
160
|
(1, "&Dive into {!r}".format(typename(obj)), Icon('core'),
|
|
@@ -204,6 +199,7 @@ def dumptree(self):
|
|
|
204
199
|
def dump(widget=None):
|
|
205
200
|
if not widget:
|
|
206
201
|
return [dump(w) for w in wx.GetTopLevelWindows()]
|
|
202
|
+
|
|
207
203
|
def _dump(w):
|
|
208
204
|
for obj in w.Children:
|
|
209
205
|
lc = list(_dump(obj))
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
mwx/__init__.py,sha256=gfhefIJIV_RbXicmCLGsyX01thIZXwxQlzIH32lMtrc,715
|
|
2
|
+
mwx/bookshelf.py,sha256=CHZiXdCclqg3WcH-5KTDt1P7-SS0dxwdwcAczaD3F8w,8527
|
|
3
|
+
mwx/controls.py,sha256=oai3NAyGl0S7T6mlzPE2A28EW0CmlxjYTYrUB87T7I4,49960
|
|
4
|
+
mwx/framework.py,sha256=zC3eguEeUAAtjC31rm7aVwRusXFdTPTvuLvkb5tYXUM,77004
|
|
5
|
+
mwx/graphman.py,sha256=5o3aIqepgQTGwYLYl81Oe_sP1Kh6h05Ns_YlBBP5XGs,72270
|
|
6
|
+
mwx/images.py,sha256=Kkfy9QI_hMtwShSjUS4-ZpC_EkVuah_XhpBOR4wAKkM,49792
|
|
7
|
+
mwx/matplot2.py,sha256=HN3hXZJENtf6xrYswWlmI8O7YmpO_gnKmewKSKWsPLc,32822
|
|
8
|
+
mwx/matplot2g.py,sha256=0AD8JSOkhcQe08eyG68NXtjY4oENfeyaXm3ZlYNHq3g,66078
|
|
9
|
+
mwx/matplot2lg.py,sha256=w518ghVVU27eAMSYckf1KVHQylVW8gFLTCkJ-D4j-tw,27801
|
|
10
|
+
mwx/mgplt.py,sha256=wrBeK5neOi1tX9llKlKHhVVrSyoent7y6wIuW2fLZ5Y,5522
|
|
11
|
+
mwx/nutshell.py,sha256=J5DDxc29-bU2jYk86Raetf6HNM1703fGmcINRrwcb3w,146859
|
|
12
|
+
mwx/testsuite.py,sha256=pBB7ZNicI_thrg6LmNPgUOgfMWwRoAaYWN1nFy6t6S4,790
|
|
13
|
+
mwx/utilus.py,sha256=En_wVtSQxpBZ2PDKIwEKg3Nqti6unp9mi4m0h-FAmVs,40039
|
|
14
|
+
mwx/wxmon.py,sha256=TBAaLQGGGR8PCEofk7BVwaW_MBduQNXaNx3VnemNcao,12671
|
|
15
|
+
mwx/wxpdb.py,sha256=DZN2wq7__kXfxjKKM_pIv6WiWbMkheZmSVpVoHltsgU,18691
|
|
16
|
+
mwx/wxwil.py,sha256=uvSjm4WUAJyhGtKhQbKfXPJY93aVGmYsSkkRX2r0E0I,5385
|
|
17
|
+
mwx/wxwit.py,sha256=4pvOiZ2xQeQdhFipftbMu3PsUW1MTLkoD4YVZNfAOks,7168
|
|
18
|
+
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
19
|
+
mwx/plugins/ffmpeg_view.py,sha256=sfRbM1UAO9AcalqOuYf1Mx26i0fIYP0lgkwz_6aIv_s,11040
|
|
20
|
+
mwx/plugins/fft_view.py,sha256=u2TMMM7rHlvvhU412fVUHcrGWslZcFL9y-iBbjIrhgQ,2728
|
|
21
|
+
mwx/plugins/frame_listview.py,sha256=cmVFmDzeVpIclhfxjQ4kDLURBR-RpVmI87j6mrtyQxU,10244
|
|
22
|
+
mwx/plugins/line_profile.py,sha256=zT9p22YCkxjGtoLwVDcfqW9M80Xn2qBEt096qq7N9QQ,815
|
|
23
|
+
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
24
|
+
mwx/py/filling.py,sha256=B8SqgbSEDTN3kVkQe1jJWb3AnYSzanu_YKYBtUchGLA,16847
|
|
25
|
+
mwxlib-1.8.0.dist-info/METADATA,sha256=kz1qha1GWM_2xVADL6fxkHP2jAEXa77wqy3vsdDiVf8,7381
|
|
26
|
+
mwxlib-1.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
mwxlib-1.8.0.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-1.8.0.dist-info/RECORD,,
|
mwxlib-1.7.13.dist-info/RECORD
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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,,
|
|
File without changes
|
|
File without changes
|