mwxlib 0.99.6__py3-none-any.whl → 0.99.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 +3 -3
- mwx/framework.py +6 -10
- mwx/graphman.py +5 -4
- mwx/nutshell.py +5 -13
- mwx/wxmon.py +7 -3
- mwx/wxwit.py +22 -19
- {mwxlib-0.99.6.dist-info → mwxlib-0.99.8.dist-info}/METADATA +1 -1
- {mwxlib-0.99.6.dist-info → mwxlib-0.99.8.dist-info}/RECORD +11 -11
- {mwxlib-0.99.6.dist-info → mwxlib-0.99.8.dist-info}/LICENSE +0 -0
- {mwxlib-0.99.6.dist-info → mwxlib-0.99.8.dist-info}/WHEEL +0 -0
- {mwxlib-0.99.6.dist-info → mwxlib-0.99.8.dist-info}/top_level.txt +0 -0
mwx/controls.py
CHANGED
|
@@ -581,8 +581,8 @@ class KnobCtrlPanel(scrolled.ScrolledPanel):
|
|
|
581
581
|
x, y = evt.Position
|
|
582
582
|
for child in self.Sizer.Children: # child <wx._core.SizerItem>
|
|
583
583
|
if child.IsShown():
|
|
584
|
-
obj = child.Sizer
|
|
585
|
-
if isinstance(obj,
|
|
584
|
+
obj = child.Sizer
|
|
585
|
+
if isinstance(obj, wx.StaticBoxSizer):
|
|
586
586
|
cx, cy = obj.Position
|
|
587
587
|
if cx < x < cx + obj.Size[0] and cy < y < cy+22:
|
|
588
588
|
for cc in obj.Children: # child of child <wx._core.SizerItem>
|
|
@@ -737,7 +737,7 @@ class KnobCtrlPanel(scrolled.ScrolledPanel):
|
|
|
737
737
|
|
|
738
738
|
|
|
739
739
|
class ControlPanel(CtrlInterface, KnobCtrlPanel):
|
|
740
|
-
"""
|
|
740
|
+
"""Control panel with mouse/key event interface.
|
|
741
741
|
"""
|
|
742
742
|
def __init__(self, *args, **kwargs):
|
|
743
743
|
KnobCtrlPanel.__init__(self, *args, **kwargs)
|
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "0.99.
|
|
4
|
+
__version__ = "0.99.8"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from contextlib import contextmanager
|
|
@@ -1137,7 +1137,7 @@ class ShellFrame(MiniFrame):
|
|
|
1137
1137
|
EventMonitor.__module__, # Don't enter event-hook
|
|
1138
1138
|
FSM.__module__,
|
|
1139
1139
|
'wx.core', 'wx.lib.eventwatcher',
|
|
1140
|
-
'fnmatch', 'warnings', 'bdb', 'pdb',
|
|
1140
|
+
'fnmatch', 'warnings', 'bdb', 'pdb', 'contextlib',
|
|
1141
1141
|
],
|
|
1142
1142
|
)
|
|
1143
1143
|
self.inspector = Inspector(self, name="Inspector")
|
|
@@ -1255,7 +1255,7 @@ class ShellFrame(MiniFrame):
|
|
|
1255
1255
|
0 : {
|
|
1256
1256
|
'* pressed' : (0, fork_debugger),
|
|
1257
1257
|
'* released' : (0, fork_debugger),
|
|
1258
|
-
'C-g pressed' : (0, self.
|
|
1258
|
+
'C-g pressed' : (0, self.Quit, fork_debugger),
|
|
1259
1259
|
'f1 pressed' : (0, self.About),
|
|
1260
1260
|
'C-f pressed' : (0, self.OnFindText),
|
|
1261
1261
|
'f3 pressed' : (0, self.OnFindNext),
|
|
@@ -1358,7 +1358,7 @@ class ShellFrame(MiniFrame):
|
|
|
1358
1358
|
Style=Stylus.py_log_mode)
|
|
1359
1359
|
|
|
1360
1360
|
self.Help.set_attributes(ReadOnly=False,
|
|
1361
|
-
Style=Stylus.
|
|
1361
|
+
Style=Stylus.py_log_mode)
|
|
1362
1362
|
|
|
1363
1363
|
self.set_hookable(self.Scratch)
|
|
1364
1364
|
self.set_hookable(self.Log)
|
|
@@ -1433,7 +1433,7 @@ class ShellFrame(MiniFrame):
|
|
|
1433
1433
|
evt.Veto()
|
|
1434
1434
|
return
|
|
1435
1435
|
#? RuntimeError('wrapped C/C++ object ... has been deleted')
|
|
1436
|
-
self.
|
|
1436
|
+
self.Quit()
|
|
1437
1437
|
|
|
1438
1438
|
if self.debugger.tracing:
|
|
1439
1439
|
wx.MessageBox("The debugger ends tracing.\n\n"
|
|
@@ -1602,12 +1602,8 @@ class ShellFrame(MiniFrame):
|
|
|
1602
1602
|
## Actions for handler
|
|
1603
1603
|
## --------------------------------
|
|
1604
1604
|
|
|
1605
|
-
def
|
|
1605
|
+
def Quit(self, evt=None):
|
|
1606
1606
|
"""Stop debugger and monitor."""
|
|
1607
|
-
## self.inspector.unwatch()
|
|
1608
|
-
self.monitor.unwatch()
|
|
1609
|
-
self.ginfo.unwatch()
|
|
1610
|
-
self.linfo.unwatch()
|
|
1611
1607
|
self.debugger.unwatch()
|
|
1612
1608
|
self.debugger.send_input('\n') # terminates the reader of threading pdb
|
|
1613
1609
|
shell = self.debugger.interactive_shell # reset interp locals
|
mwx/graphman.py
CHANGED
|
@@ -162,12 +162,13 @@ class Thread:
|
|
|
162
162
|
"""
|
|
163
163
|
if not self.running:
|
|
164
164
|
return None
|
|
165
|
+
if '\n\n' not in msg:
|
|
166
|
+
msg += '\n\n'
|
|
165
167
|
try:
|
|
166
168
|
self.event.clear() # suspend
|
|
167
|
-
if wx.MessageBox(msg +
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
style=wx.OK|wx.CANCEL|wx.ICON_WARNING) != wx.OK:
|
|
169
|
+
if wx.MessageBox(msg +
|
|
170
|
+
"Do you want to terminate the process?",
|
|
171
|
+
style=wx.OK|wx.CANCEL|wx.ICON_WARNING) == wx.OK:
|
|
171
172
|
self.Stop()
|
|
172
173
|
return False
|
|
173
174
|
return True
|
mwx/nutshell.py
CHANGED
|
@@ -2107,16 +2107,13 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
2107
2107
|
return filter(None, _gen_text())
|
|
2108
2108
|
|
|
2109
2109
|
def eval_line(self):
|
|
2110
|
-
self.py_eval_line(self.globals, self.locals)
|
|
2111
|
-
|
|
2112
|
-
def py_eval_line(self, globals=None, locals=None):
|
|
2113
2110
|
if self.CallTipActive():
|
|
2114
2111
|
self.CallTipCancel()
|
|
2115
2112
|
|
|
2116
2113
|
status = "No words"
|
|
2117
2114
|
for text in self.gen_text_at_caret():
|
|
2118
2115
|
try:
|
|
2119
|
-
obj = eval(text, globals, locals)
|
|
2116
|
+
obj = eval(text, self.globals, self.locals)
|
|
2120
2117
|
except Exception as e:
|
|
2121
2118
|
status = "- {} : {!r}".format(e, text)
|
|
2122
2119
|
else:
|
|
@@ -2126,14 +2123,9 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
2126
2123
|
self.message(status)
|
|
2127
2124
|
|
|
2128
2125
|
def exec_region(self):
|
|
2129
|
-
self.py_exec_region(self.globals, self.locals)
|
|
2130
|
-
|
|
2131
|
-
def py_exec_region(self, globals=None, locals=None, filename=None):
|
|
2132
|
-
if not filename:
|
|
2133
|
-
filename = self.filename
|
|
2134
2126
|
try:
|
|
2135
|
-
code = compile(self.Text, filename, "exec")
|
|
2136
|
-
exec(code, globals, locals)
|
|
2127
|
+
code = compile(self.Text, self.filename, "exec")
|
|
2128
|
+
exec(code, self.globals, self.locals)
|
|
2137
2129
|
dispatcher.send(signal='Interpreter.push',
|
|
2138
2130
|
sender=self, command=None, more=False)
|
|
2139
2131
|
except BdbQuit:
|
|
@@ -2142,7 +2134,7 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
2142
2134
|
except Exception as e:
|
|
2143
2135
|
msg = traceback.format_exc()
|
|
2144
2136
|
err = re.findall(py_error_re, msg, re.M)
|
|
2145
|
-
lines = [int(ln) for fn, ln in err if fn == filename]
|
|
2137
|
+
lines = [int(ln) for fn, ln in err if fn == self.filename]
|
|
2146
2138
|
if lines:
|
|
2147
2139
|
lx = lines[-1] - 1
|
|
2148
2140
|
self.red_arrow = lx
|
|
@@ -2158,7 +2150,7 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
2158
2150
|
del self.pointer # Reset pointer (debugger hook point).
|
|
2159
2151
|
del self.red_arrow
|
|
2160
2152
|
self.handler('buffer_region_executed', self)
|
|
2161
|
-
self.message("Evaluated {!r} successfully.".format(filename))
|
|
2153
|
+
self.message("Evaluated {!r} successfully.".format(self.filename))
|
|
2162
2154
|
self.AnnotationClearAll()
|
|
2163
2155
|
|
|
2164
2156
|
|
mwx/wxmon.py
CHANGED
|
@@ -7,7 +7,7 @@ import wx
|
|
|
7
7
|
import wx.lib.eventwatcher as ew
|
|
8
8
|
from wx.lib.mixins.listctrl import ListCtrlAutoWidthMixin
|
|
9
9
|
|
|
10
|
-
from .utilus import where
|
|
10
|
+
from .utilus import where, ignore
|
|
11
11
|
from .controls import Icon, Clipboard
|
|
12
12
|
from .framework import CtrlInterface, Menu
|
|
13
13
|
|
|
@@ -99,8 +99,8 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
99
99
|
|
|
100
100
|
def watch(self, widget=None):
|
|
101
101
|
"""Begin watching the widget."""
|
|
102
|
-
self.clear()
|
|
103
102
|
self.unwatch()
|
|
103
|
+
self.clear()
|
|
104
104
|
if widget is None:
|
|
105
105
|
widget = self._target # Resume watching the previous target.
|
|
106
106
|
if not widget:
|
|
@@ -174,7 +174,11 @@ class EventMonitor(wx.ListCtrl, ListCtrlAutoWidthMixin, CtrlInterface):
|
|
|
174
174
|
name = self.get_name(event)
|
|
175
175
|
source = ew._makeSourceString(obj) + " id=0x{:X}".format(id(evt))
|
|
176
176
|
stamp = 1
|
|
177
|
-
|
|
177
|
+
try:
|
|
178
|
+
with ignore(DeprecationWarning):
|
|
179
|
+
attribs = ew._makeAttribString(evt)
|
|
180
|
+
except Exception:
|
|
181
|
+
attribs = '' # Failed to get event attributes; possibly <BdbQuit>.
|
|
178
182
|
data = self.__items
|
|
179
183
|
for i, item in enumerate(data):
|
|
180
184
|
if item[0] == event:
|
mwx/wxwit.py
CHANGED
|
@@ -49,13 +49,17 @@ 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('
|
|
53
|
-
def
|
|
52
|
+
@self.handler.bind('f3 pressed')
|
|
53
|
+
def _watchit(evt):
|
|
54
54
|
if self.target:
|
|
55
|
-
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
|
|
62
|
+
def _refresh(evt):
|
|
59
63
|
self.BuildTree(self.target)
|
|
60
64
|
|
|
61
65
|
def OnDestroy(self, evt):
|
|
@@ -73,7 +77,10 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
73
77
|
## --------------------------------
|
|
74
78
|
|
|
75
79
|
def SetObj(self, obj):
|
|
76
|
-
"""Called from tree.toolFrame -> SetObj.
|
|
80
|
+
"""Called from tree.toolFrame -> SetObj.
|
|
81
|
+
|
|
82
|
+
(override) Set target object.
|
|
83
|
+
"""
|
|
77
84
|
if self.target is obj:
|
|
78
85
|
return
|
|
79
86
|
self.target = obj
|
|
@@ -86,7 +93,8 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
86
93
|
|
|
87
94
|
def GetTextForWidget(self, obj):
|
|
88
95
|
"""Returns the string to be used in the tree for a widget.
|
|
89
|
-
|
|
96
|
+
|
|
97
|
+
(override) Make better object name and Id.
|
|
90
98
|
"""
|
|
91
99
|
clsname = obj.__class__.__name__
|
|
92
100
|
if hasattr(obj, 'Name'):
|
|
@@ -103,7 +111,6 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
103
111
|
self.highlighter.HighlightSizer(obj.Sizer)
|
|
104
112
|
|
|
105
113
|
def set_colour(self, obj, col):
|
|
106
|
-
self.SetObj(obj)
|
|
107
114
|
item = self.FindWidgetItem(obj)
|
|
108
115
|
if item:
|
|
109
116
|
self.SetItemTextColour(item, col)
|
|
@@ -158,11 +165,15 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
158
165
|
self.SetFocus()
|
|
159
166
|
obj = self.target
|
|
160
167
|
Menu.Popup(self, [
|
|
161
|
-
(
|
|
162
|
-
lambda v:
|
|
168
|
+
(1, "&Dive into {!r}".format(typename(obj)), Icon('core'),
|
|
169
|
+
lambda v: dive(obj),
|
|
170
|
+
lambda v: v.Enable(obj is not None)),
|
|
171
|
+
|
|
172
|
+
(2, "&Watch event", Icon('tv'),
|
|
173
|
+
lambda v: watch(obj),
|
|
163
174
|
lambda v: v.Enable(obj is not None)),
|
|
164
|
-
|
|
165
|
-
(10, "&Inspection Tool", Icon('inspect'),
|
|
175
|
+
(),
|
|
176
|
+
(10, "&Inspection Tool\tf3", Icon('inspect'),
|
|
166
177
|
lambda v: watchit(obj),
|
|
167
178
|
lambda v: v.Enable(obj is not None)),
|
|
168
179
|
(),
|
|
@@ -172,14 +183,6 @@ class Inspector(it.InspectionTree, CtrlInterface):
|
|
|
172
183
|
|
|
173
184
|
(12, "Refresh\tf5", miniIcon('Refresh'),
|
|
174
185
|
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
186
|
])
|
|
184
187
|
|
|
185
188
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=U7n9X8JAWdzOavKvVqecHdE4ooiXcCB5DSPCKWxfTnY,653
|
|
2
2
|
mwx/bookshelf.py,sha256=so-xSLq08sMlJBErTxOaDoKUAMa_g1CkIP2pNnff68c,5607
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=5RDA9YgxrxCmjrHOU6XgA_5tcOU1UEwqU4tFEuBNcrk,47648
|
|
4
|
+
mwx/framework.py,sha256=lxqSl_IrGp7ZAUPKJWP5JaUUm3vhaOCjAujFVPocPXg,75501
|
|
5
|
+
mwx/graphman.py,sha256=qX5aHEw4u9iGR8lNpZkXDnGPVMhyAH6NnBapiaUbKZw,70265
|
|
6
6
|
mwx/images.py,sha256=_-Eh3xF7Khu42ivkYp97NXIzSNGbjcidqtWjZQFGtqE,47827
|
|
7
7
|
mwx/matplot2.py,sha256=xCJ_ZzdDEWmzctpPaOrzTnwXyHINP4nfFHweoTZa6ug,32899
|
|
8
8
|
mwx/matplot2g.py,sha256=gCXa8X1MEMP7n_mG73h3SkWKuNZOfjVKUTWNRXXK11c,64310
|
|
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=
|
|
11
|
+
mwx/nutshell.py,sha256=zJULq1K8WiOBUncMpXE8HbunqUULa9MUt0hBET5jmgs,141810
|
|
12
12
|
mwx/utilus.py,sha256=iizdVrbwL1lX7eTfsMmltFz4IfHqTXVM37wwlPQ3A3Y,37346
|
|
13
|
-
mwx/wxmon.py,sha256=
|
|
13
|
+
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
14
14
|
mwx/wxpdb.py,sha256=lLowkkAgMhPFHAfklD7wZHq0qbSMjRxnBFtSajmVgME,19133
|
|
15
15
|
mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
|
|
16
|
-
mwx/wxwit.py,sha256=
|
|
16
|
+
mwx/wxwit.py,sha256=l7uq6NgGBhay-uAE1pQgWziSAGO9QZPJ4EpEBw1P9xU,7357
|
|
17
17
|
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
18
18
|
mwx/plugins/ffmpeg_view.py,sha256=Mmen75o6LyA5QEHB8sCFSPCIPvEaALKzrgomym3fGAU,10721
|
|
19
19
|
mwx/plugins/fft_view.py,sha256=xxTDD-_z4l18u4t2ybPB3xAMIslJmJ0gQlTxEqJUhNI,2782
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=yEYPCdLHLSMTJwTv6iYAh3Lo4lJvYfp5BxTLP3FhW9Y
|
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=--9NIc3x5EfRB3L59JvD7rzENQHyiYfu7wWJo6AuMkA,820
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
23
|
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
24
|
-
mwxlib-0.99.
|
|
25
|
-
mwxlib-0.99.
|
|
26
|
-
mwxlib-0.99.
|
|
27
|
-
mwxlib-0.99.
|
|
28
|
-
mwxlib-0.99.
|
|
24
|
+
mwxlib-0.99.8.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.99.8.dist-info/METADATA,sha256=C8n66k4LeYcPBb91oVSh7D68pfZI2d1JteEJn3F4UQU,7411
|
|
26
|
+
mwxlib-0.99.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
27
|
+
mwxlib-0.99.8.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.99.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|