mwxlib 0.97.1__py3-none-any.whl → 0.97.2__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/bookshelf.py +8 -15
- mwx/controls.py +1 -15
- mwx/framework.py +1 -2
- mwx/graphman.py +0 -3
- mwx/matplot2g.py +2 -10
- mwx/nutshell.py +0 -2
- mwx/py/filling.py +3 -2
- {mwxlib-0.97.1.dist-info → mwxlib-0.97.2.dist-info}/METADATA +1 -1
- {mwxlib-0.97.1.dist-info → mwxlib-0.97.2.dist-info}/RECORD +12 -12
- {mwxlib-0.97.1.dist-info → mwxlib-0.97.2.dist-info}/WHEEL +1 -1
- {mwxlib-0.97.1.dist-info → mwxlib-0.97.2.dist-info}/LICENSE +0 -0
- {mwxlib-0.97.1.dist-info → mwxlib-0.97.2.dist-info}/top_level.txt +0 -0
mwx/bookshelf.py
CHANGED
|
@@ -31,21 +31,13 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
31
31
|
'buffer_caption_updated' : [ None, self.on_buffer_filename ],
|
|
32
32
|
},
|
|
33
33
|
}
|
|
34
|
+
wx.CallAfter(self.attach, target=parent)
|
|
34
35
|
|
|
35
36
|
## self.Bind(wx.EVT_TREE_ITEM_GETTOOLTIP, self.OnItemTooltip)
|
|
36
37
|
self.Bind(wx.EVT_TREE_SEL_CHANGED, self.OnSelChanged)
|
|
37
38
|
self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)
|
|
38
39
|
|
|
39
|
-
def
|
|
40
|
-
data = self.GetItemData(self.Selection)
|
|
41
|
-
if data:
|
|
42
|
-
data.SetFocus()
|
|
43
|
-
|
|
44
|
-
def refresh(clear=False):
|
|
45
|
-
self.build_tree(clear)
|
|
46
|
-
wx.CallAfter(self.SetFocus)
|
|
47
|
-
|
|
48
|
-
def delete():
|
|
40
|
+
def delete_item():
|
|
49
41
|
data = self.GetItemData(self.Selection)
|
|
50
42
|
if data:
|
|
51
43
|
data.parent.kill_buffer(data) # -> focus moves
|
|
@@ -62,10 +54,9 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
62
54
|
'*button* released' : [ None, dispatch ],
|
|
63
55
|
},
|
|
64
56
|
0 : {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
'S-f5 pressed' : (0, _F(refresh, clear=1)),
|
|
57
|
+
'delete pressed' : (0, _F(delete_item)),
|
|
58
|
+
'f5 pressed' : (0, _F(self.build_tree, clear=0)),
|
|
59
|
+
'S-f5 pressed' : (0, _F(self.build_tree, clear=1)),
|
|
69
60
|
},
|
|
70
61
|
})
|
|
71
62
|
|
|
@@ -75,6 +66,8 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
75
66
|
evt.Skip()
|
|
76
67
|
|
|
77
68
|
def attach(self, target):
|
|
69
|
+
if not self:
|
|
70
|
+
return
|
|
78
71
|
self.detach()
|
|
79
72
|
self.target = target
|
|
80
73
|
for editor in self.target.all_editors:
|
|
@@ -82,7 +75,7 @@ class EditorTreeCtrl(wx.TreeCtrl, CtrlInterface):
|
|
|
82
75
|
self.build_tree()
|
|
83
76
|
|
|
84
77
|
def detach(self):
|
|
85
|
-
if not self.target:
|
|
78
|
+
if not self or not self.target:
|
|
86
79
|
return
|
|
87
80
|
for editor in self.target.all_editors:
|
|
88
81
|
editor.handler.remove(self.context)
|
mwx/controls.py
CHANGED
|
@@ -84,14 +84,6 @@ class Param(object):
|
|
|
84
84
|
def __len__(self):
|
|
85
85
|
return len(self.range)
|
|
86
86
|
|
|
87
|
-
def bind(self, action=None, target='control'):
|
|
88
|
-
warn("Use `Param.callback.bind` instead.", DeprecationWarning)
|
|
89
|
-
return self.callback.bind(target, action)
|
|
90
|
-
|
|
91
|
-
def unbind(self, action=None, target='control'):
|
|
92
|
-
warn("Use `Param.callback.unbind` instead.", DeprecationWarning)
|
|
93
|
-
return self.callback.unbind(target, action)
|
|
94
|
-
|
|
95
87
|
def reset(self, v=None, backcall=True):
|
|
96
88
|
"""Reset value when indexed (by knobs) with callback."""
|
|
97
89
|
if v is None or v == '':
|
|
@@ -315,8 +307,7 @@ class Knob(wx.Panel):
|
|
|
315
307
|
self.update_ctrl()
|
|
316
308
|
|
|
317
309
|
def __init__(self, parent, param, type=None,
|
|
318
|
-
style=None,
|
|
319
|
-
**kwargs):
|
|
310
|
+
style=None, cw=-1, lw=-1, tw=-1, h=22, **kwargs):
|
|
320
311
|
wx.Panel.__init__(self, parent, **kwargs)
|
|
321
312
|
|
|
322
313
|
assert isinstance(param, Param),\
|
|
@@ -359,9 +350,6 @@ class Knob(wx.Panel):
|
|
|
359
350
|
self.label.SetToolTip(self.__par._tooltip)
|
|
360
351
|
self.label.Enable(lw) # skip focus
|
|
361
352
|
|
|
362
|
-
if not editable:
|
|
363
|
-
warn("Knob option `editable` is deprecated.", DeprecationWarning)
|
|
364
|
-
|
|
365
353
|
self.text = wx.TextCtrl(self, size=(tw,h), style=wx.TE_PROCESS_ENTER)
|
|
366
354
|
self.text.Bind(wx.EVT_TEXT_ENTER, self.OnTextEnter)
|
|
367
355
|
self.text.Bind(wx.EVT_KILL_FOCUS, self.OnTextExit)
|
|
@@ -926,8 +914,6 @@ class Icon(wx.Bitmap):
|
|
|
926
914
|
bmp = wx.NullBitmap
|
|
927
915
|
return bmp
|
|
928
916
|
|
|
929
|
-
Icon2 = Icon # for backward compatibility
|
|
930
|
-
|
|
931
917
|
|
|
932
918
|
def _getBitmap1(key, size=(16,16)):
|
|
933
919
|
if isinstance(key, wx.Bitmap):
|
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "0.97.
|
|
4
|
+
__version__ = "0.97.2"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from functools import wraps, partial
|
|
@@ -1111,7 +1111,6 @@ class ShellFrame(MiniFrame):
|
|
|
1111
1111
|
|
|
1112
1112
|
self.Bookshelf = EditorTreeCtrl(self, name="Bookshelf",
|
|
1113
1113
|
style=wx.TR_DEFAULT_STYLE|wx.TR_HIDE_ROOT)
|
|
1114
|
-
wx.CallAfter(self.Bookshelf.attach, self)
|
|
1115
1114
|
|
|
1116
1115
|
from .wxpdb import Debugger
|
|
1117
1116
|
from .wxwit import Inspector
|
mwx/graphman.py
CHANGED
|
@@ -1477,9 +1477,6 @@ class Frame(mwx.Frame):
|
|
|
1477
1477
|
print(self.message.read())
|
|
1478
1478
|
return frames
|
|
1479
1479
|
|
|
1480
|
-
import_index = load_index # for backward compatibility
|
|
1481
|
-
export_index = save_index # for backward compatibility
|
|
1482
|
-
|
|
1483
1480
|
## --------------------------------
|
|
1484
1481
|
## load/save frames and attributes
|
|
1485
1482
|
## --------------------------------
|
mwx/matplot2g.py
CHANGED
|
@@ -325,15 +325,12 @@ class AxesImagePhantom(object):
|
|
|
325
325
|
return self.__buf[ny, nx] # nearest value
|
|
326
326
|
return ndi.map_coordinates(self.__buf, np.vstack((ny, nx))) # spline value
|
|
327
327
|
|
|
328
|
-
def xytopixel(self, x, y
|
|
328
|
+
def xytopixel(self, x, y, cast=True):
|
|
329
329
|
"""Convert xydata (x,y) -> [nx,ny] pixel.
|
|
330
330
|
If cast, convert pixel-based lengths to pixel numbers.
|
|
331
331
|
"""
|
|
332
332
|
def _cast(n):
|
|
333
333
|
return np.int32(np.floor(np.round(n, 1)))
|
|
334
|
-
if y is None:
|
|
335
|
-
warn("Setting xy data with single tuple.", DeprecationWarning)
|
|
336
|
-
x, y = x
|
|
337
334
|
if isinstance(x, (list, tuple)):
|
|
338
335
|
x = np.array(x)
|
|
339
336
|
y = np.array(y)
|
|
@@ -345,11 +342,8 @@ class AxesImagePhantom(object):
|
|
|
345
342
|
return (_cast(nx), _cast(ny))
|
|
346
343
|
return (nx-0.5, ny-0.5)
|
|
347
344
|
|
|
348
|
-
def xyfrompixel(self, nx, ny
|
|
345
|
+
def xyfrompixel(self, nx, ny):
|
|
349
346
|
"""Convert pixel [nx,ny] -> (x,y) xydata (float number)."""
|
|
350
|
-
if ny is None:
|
|
351
|
-
warn("Setting xy data with single tuple.", DeprecationWarning)
|
|
352
|
-
nx, ny = nx
|
|
353
347
|
if isinstance(nx, (list, tuple)):
|
|
354
348
|
nx = np.array(nx)
|
|
355
349
|
ny = np.array(ny)
|
|
@@ -814,8 +808,6 @@ class GraphPlot(MatplotPanel):
|
|
|
814
808
|
self.handler('frame_updated', art)
|
|
815
809
|
self.canvas.draw_idle()
|
|
816
810
|
|
|
817
|
-
globalunit = unit # for backward compatibility
|
|
818
|
-
|
|
819
811
|
def kill_buffer(self):
|
|
820
812
|
if self.buffer is not None:
|
|
821
813
|
del self.buffer
|
mwx/nutshell.py
CHANGED
|
@@ -2006,8 +2006,6 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2006
2006
|
self.delete_buffer(buf)
|
|
2007
2007
|
return False
|
|
2008
2008
|
|
|
2009
|
-
load_url = load_file # for backward compatibility
|
|
2010
|
-
|
|
2011
2009
|
def find_file(self, filename=None):
|
|
2012
2010
|
"""Open the specified file."""
|
|
2013
2011
|
if not filename:
|
mwx/py/filling.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""Filling is the gui tree control through which a user can navigate
|
|
3
|
-
the local namespace or any object.
|
|
4
|
-
|
|
3
|
+
the local namespace or any object.
|
|
4
|
+
"""
|
|
5
5
|
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
|
|
6
|
+
__author__ += "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
7
|
# Tags: py3-port
|
|
7
8
|
|
|
8
9
|
import wx
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
|
|
2
|
-
mwx/bookshelf.py,sha256=
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
5
|
-
mwx/graphman.py,sha256=
|
|
2
|
+
mwx/bookshelf.py,sha256=ILKB13hX4riJnYFJmUvu2b1xa4uz8KxA1ZVuf4Y1zqM,5136
|
|
3
|
+
mwx/controls.py,sha256=KAnzk2EeiBZsvJkfIHKIXo8bhxc6uVpC5CW802657ow,47815
|
|
4
|
+
mwx/framework.py,sha256=4mawMkpnYUeESV0UTH3Qh79gki8MRbANl-f7EV75yOo,75249
|
|
5
|
+
mwx/graphman.py,sha256=Y6PD9L-ee5hc7nwBkmTDDKXf6cGHkc5L-f6OW3QtD6M,70486
|
|
6
6
|
mwx/images.py,sha256=_-Eh3xF7Khu42ivkYp97NXIzSNGbjcidqtWjZQFGtqE,47827
|
|
7
7
|
mwx/matplot2.py,sha256=xCJ_ZzdDEWmzctpPaOrzTnwXyHINP4nfFHweoTZa6ug,32899
|
|
8
|
-
mwx/matplot2g.py,sha256=
|
|
8
|
+
mwx/matplot2g.py,sha256=arUt5WMQCOg56mQLxUVQqIVHJ-HzwV-YpPcZiLTWrz0,64129
|
|
9
9
|
mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
|
|
10
10
|
mwx/mgplt.py,sha256=ITzxA97yDwr_35BUk5OqnyskSuKVDbpf2AQCKY1jHTI,5671
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
11
|
+
mwx/nutshell.py,sha256=Oiy9HEWrQAL4KPz0qveH8J1W8Nd4aDWMjWcO58ZMV10,137322
|
|
12
12
|
mwx/utilus.py,sha256=8GK_2mGY08DVN5_SGWynLKQEJsCKqvqWTDToar1XozM,37333
|
|
13
13
|
mwx/wxmon.py,sha256=f3V24EF7kdMlYF7usLYK9QE5KU6fSu0jVqsvwAiA-Ag,12647
|
|
14
14
|
mwx/wxpdb.py,sha256=lLowkkAgMhPFHAfklD7wZHq0qbSMjRxnBFtSajmVgME,19133
|
|
@@ -20,9 +20,9 @@ mwx/plugins/fft_view.py,sha256=xxTDD-_z4l18u4t2ybPB3xAMIslJmJ0gQlTxEqJUhNI,2782
|
|
|
20
20
|
mwx/plugins/frame_listview.py,sha256=hbApzZWa9-BmQthu7uZBlBbGbtf4iJ_prO8IhxoGMs8,10421
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=--9NIc3x5EfRB3L59JvD7rzENQHyiYfu7wWJo6AuMkA,820
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
|
-
mwx/py/filling.py,sha256=
|
|
24
|
-
mwxlib-0.97.
|
|
25
|
-
mwxlib-0.97.
|
|
26
|
-
mwxlib-0.97.
|
|
27
|
-
mwxlib-0.97.
|
|
28
|
-
mwxlib-0.97.
|
|
23
|
+
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
24
|
+
mwxlib-0.97.2.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.97.2.dist-info/METADATA,sha256=dBXbEkroA5_XxikmiXvAEQix_YjHJoQiKN-sKABSyCs,1880
|
|
26
|
+
mwxlib-0.97.2.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
|
27
|
+
mwxlib-0.97.2.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.97.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|