mwxlib 1.2.0__py3-none-any.whl → 1.2.4__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/framework.py +1 -1
- mwx/matplot2.py +4 -4
- mwx/matplot2g.py +112 -96
- mwx/nutshell.py +20 -19
- mwx/wxpdb.py +2 -3
- {mwxlib-1.2.0.dist-info → mwxlib-1.2.4.dist-info}/METADATA +1 -1
- {mwxlib-1.2.0.dist-info → mwxlib-1.2.4.dist-info}/RECORD +10 -10
- {mwxlib-1.2.0.dist-info → mwxlib-1.2.4.dist-info}/LICENSE +0 -0
- {mwxlib-1.2.0.dist-info → mwxlib-1.2.4.dist-info}/WHEEL +0 -0
- {mwxlib-1.2.0.dist-info → mwxlib-1.2.4.dist-info}/top_level.txt +0 -0
mwx/framework.py
CHANGED
mwx/matplot2.py
CHANGED
|
@@ -348,22 +348,22 @@ class MatplotPanel(wx.Panel):
|
|
|
348
348
|
xbound = property(
|
|
349
349
|
lambda self: np.array(self.axes.get_xbound()),
|
|
350
350
|
lambda self,v: self.axes.set_xbound(v),
|
|
351
|
-
doc="
|
|
351
|
+
doc="X-axis numerical bounds where lowerBound < upperBound)")
|
|
352
352
|
|
|
353
353
|
ybound = property(
|
|
354
354
|
lambda self: np.array(self.axes.get_ybound()),
|
|
355
355
|
lambda self,v: self.axes.set_ybound(v),
|
|
356
|
-
doc="
|
|
356
|
+
doc="Y-axis numerical bounds where lowerBound < upperBound)")
|
|
357
357
|
|
|
358
358
|
xlim = property(
|
|
359
359
|
lambda self: np.array(self.axes.get_xlim()),
|
|
360
360
|
lambda self,v: self.axes.set_xlim(v),
|
|
361
|
-
doc="
|
|
361
|
+
doc="X-axis range [left, right]")
|
|
362
362
|
|
|
363
363
|
ylim = property(
|
|
364
364
|
lambda self: np.array(self.axes.get_ylim()),
|
|
365
365
|
lambda self,v: self.axes.set_ylim(v),
|
|
366
|
-
doc="
|
|
366
|
+
doc="Y-axis range [bottom, top]")
|
|
367
367
|
|
|
368
368
|
@property
|
|
369
369
|
def ddpu(self):
|
mwx/matplot2g.py
CHANGED
|
@@ -14,7 +14,7 @@ from scipy import ndimage as ndi
|
|
|
14
14
|
|
|
15
15
|
from . import framework as mwx
|
|
16
16
|
from .framework import Menu
|
|
17
|
-
|
|
17
|
+
from .utilus import warn
|
|
18
18
|
from .utilus import funcall as _F
|
|
19
19
|
from .controls import Clipboard
|
|
20
20
|
from .matplot2 import MatplotPanel
|
|
@@ -73,22 +73,20 @@ def _to_image(src, cutoff=0, threshold=None, binning=1):
|
|
|
73
73
|
if src.dtype in (np.complex64, np.complex128): # maybe fft pattern
|
|
74
74
|
src = np.log(1 + abs(src))
|
|
75
75
|
|
|
76
|
-
bins = binning
|
|
77
76
|
if threshold:
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
if
|
|
84
|
-
## src = src[::bins,::bins]
|
|
77
|
+
## Reduce the binning by itemsize before finally converting to <uint8>.
|
|
78
|
+
## Select the larger value between binning and threshold.
|
|
79
|
+
n = max(binning, int(np.sqrt(src.nbytes / threshold / src.itemsize)) + 1)
|
|
80
|
+
else:
|
|
81
|
+
n = binning
|
|
82
|
+
if n > 1:
|
|
85
83
|
src = _to_cvtype(src)
|
|
86
|
-
src = cv2.resize(src, None, fx=1/
|
|
84
|
+
src = cv2.resize(src, None, fx=1/n, fy=1/n, interpolation=cv2.INTER_AREA)
|
|
87
85
|
|
|
88
86
|
if src.dtype == np.uint8: # RGB or gray image <uint8>
|
|
89
|
-
return
|
|
87
|
+
return n, (0, 255), src
|
|
90
88
|
|
|
91
|
-
if hasattr(cutoff, '__iter__'): # cutoff vlim:
|
|
89
|
+
if hasattr(cutoff, '__iter__'): # cutoff vlim: (vmin, vmax) is specified.
|
|
92
90
|
a, b = cutoff
|
|
93
91
|
elif cutoff > 0:
|
|
94
92
|
a = np.percentile(src, cutoff)
|
|
@@ -99,10 +97,10 @@ def _to_image(src, cutoff=0, threshold=None, binning=1):
|
|
|
99
97
|
|
|
100
98
|
r = (255 / (b - a)) if a < b else 1
|
|
101
99
|
## img = cv2.convertScaleAbs(src, alpha=r, beta=-r*a) # 負数は絶対値になるので以下に変更
|
|
102
|
-
img = np.uint8((src - a) * r)
|
|
100
|
+
img = np.uint8((src - a) * r)
|
|
103
101
|
img[src < a] = 0
|
|
104
102
|
img[src > b] = 255
|
|
105
|
-
return
|
|
103
|
+
return n, (a, b), img
|
|
106
104
|
|
|
107
105
|
|
|
108
106
|
def _Property(name):
|
|
@@ -129,7 +127,7 @@ class AxesImagePhantom:
|
|
|
129
127
|
"""
|
|
130
128
|
def __init__(self, parent, buf, name, show=True,
|
|
131
129
|
localunit=None, aspect=1.0, **attributes):
|
|
132
|
-
self.
|
|
130
|
+
self.parent = parent
|
|
133
131
|
self.__name = name
|
|
134
132
|
self.__localunit = localunit or None # [+] value, no assertion
|
|
135
133
|
self.__aspect_ratio = aspect
|
|
@@ -141,7 +139,7 @@ class AxesImagePhantom:
|
|
|
141
139
|
threshold = self.parent.nbytes_threshold,
|
|
142
140
|
)
|
|
143
141
|
self.__bins = bins
|
|
144
|
-
self.
|
|
142
|
+
self.__cuts = vlim
|
|
145
143
|
self.__art = parent.axes.imshow(img,
|
|
146
144
|
cmap = cm.gray,
|
|
147
145
|
aspect = 'equal',
|
|
@@ -155,41 +153,9 @@ class AxesImagePhantom:
|
|
|
155
153
|
return getattr(self.__art, attr)
|
|
156
154
|
|
|
157
155
|
def __eq__(self, x):
|
|
156
|
+
## Called in `on_pick` and `__contains__` to check objects in.
|
|
158
157
|
return x is self.__art
|
|
159
158
|
|
|
160
|
-
parent = property(lambda self: self.__owner)
|
|
161
|
-
artist = property(lambda self: self.__art)
|
|
162
|
-
name = property(lambda self: self.__name)
|
|
163
|
-
buffer = property(lambda self: self.__buf) # buffer.setter is defined below.
|
|
164
|
-
binning = property(lambda self: self.__bins)
|
|
165
|
-
|
|
166
|
-
image = property(
|
|
167
|
-
lambda self: self.__art.get_array(),
|
|
168
|
-
doc="A displayed image array<uint8>.")
|
|
169
|
-
|
|
170
|
-
vlim = property(
|
|
171
|
-
lambda self: self.__vlim,
|
|
172
|
-
doc="Image lower/upper values.")
|
|
173
|
-
|
|
174
|
-
clim = property(
|
|
175
|
-
lambda self: self.__art.get_clim(),
|
|
176
|
-
lambda self,v: self.__art.set_clim(v),
|
|
177
|
-
doc="Buffer lower/upper values.")
|
|
178
|
-
|
|
179
|
-
attributes = property(
|
|
180
|
-
lambda self: self.__attributes,
|
|
181
|
-
doc="Miscellaneous info about the frame/buffer.")
|
|
182
|
-
|
|
183
|
-
pathname = property(
|
|
184
|
-
lambda self: self.__attributes.get('pathname'),
|
|
185
|
-
lambda self,v: self.update_attributes({'pathname': v}),
|
|
186
|
-
doc="A fullpath of buffer, when bounds to file.")
|
|
187
|
-
|
|
188
|
-
annotation = property(
|
|
189
|
-
lambda self: self.__attributes.get('annotation', ''),
|
|
190
|
-
lambda self,v: self.update_attributes({'annotation': v}),
|
|
191
|
-
doc="Annotation of the buffer.")
|
|
192
|
-
|
|
193
159
|
def update_attributes(self, attr=None, **kwargs):
|
|
194
160
|
"""Update frame-specifc attributes.
|
|
195
161
|
The frame holds any attributes with dictionary
|
|
@@ -215,10 +181,70 @@ class AxesImagePhantom:
|
|
|
215
181
|
if {'pathname', 'annotation'} & attr.keys():
|
|
216
182
|
self.parent.handler('frame_updated', self)
|
|
217
183
|
|
|
184
|
+
def update_buffer(self, buf=None):
|
|
185
|
+
"""Update buffer and the image (internal use only)."""
|
|
186
|
+
if buf is not None:
|
|
187
|
+
self.__buf = _to_buffer(buf)
|
|
188
|
+
|
|
189
|
+
bins, vlim, img = _to_image(self.__buf,
|
|
190
|
+
cutoff = self.parent.score_percentile,
|
|
191
|
+
threshold = self.parent.nbytes_threshold,
|
|
192
|
+
)
|
|
193
|
+
self.__bins = bins
|
|
194
|
+
self.__cuts = vlim
|
|
195
|
+
self.__art.set_array(img)
|
|
196
|
+
self.parent.handler('frame_modified', self)
|
|
197
|
+
|
|
198
|
+
def update_extent(self):
|
|
199
|
+
"""Update logical extent of the image (internal use only)."""
|
|
200
|
+
h, w = self.__buf.shape[:2]
|
|
201
|
+
ux, uy = self.xy_unit
|
|
202
|
+
w *= ux/2
|
|
203
|
+
h *= uy/2
|
|
204
|
+
self.__art.set_extent((-w,w,-h,h))
|
|
205
|
+
|
|
218
206
|
selector = _Property('Selector')
|
|
219
207
|
markers = _Property('Markers')
|
|
220
208
|
region = _Property('Region')
|
|
221
209
|
|
|
210
|
+
artist = property(
|
|
211
|
+
lambda self: self.__art)
|
|
212
|
+
|
|
213
|
+
binning = property(
|
|
214
|
+
lambda self: self.__bins,
|
|
215
|
+
doc="Binning value resulting from the score_percentile.")
|
|
216
|
+
|
|
217
|
+
cuts = property(
|
|
218
|
+
lambda self: self.__cuts,
|
|
219
|
+
doc="Lower/Upper cutoff values of the buffer.")
|
|
220
|
+
|
|
221
|
+
image = property(
|
|
222
|
+
lambda self: self.__art.get_array(),
|
|
223
|
+
doc="Displayed image array<uint8>.")
|
|
224
|
+
|
|
225
|
+
clim = property(
|
|
226
|
+
lambda self: self.__art.get_clim(),
|
|
227
|
+
lambda self,v: self.__art.set_clim(v),
|
|
228
|
+
doc="Lower/Upper color limit values of the buffer.")
|
|
229
|
+
|
|
230
|
+
attributes = property(
|
|
231
|
+
lambda self: self.__attributes,
|
|
232
|
+
doc="Miscellaneous info about the frame/buffer.")
|
|
233
|
+
|
|
234
|
+
pathname = property(
|
|
235
|
+
lambda self: self.__attributes.get('pathname'),
|
|
236
|
+
lambda self,v: self.update_attributes({'pathname': v}),
|
|
237
|
+
doc="Fullpath of the buffer, if bound to a file.")
|
|
238
|
+
|
|
239
|
+
annotation = property(
|
|
240
|
+
lambda self: self.__attributes.get('annotation', ''),
|
|
241
|
+
lambda self,v: self.update_attributes({'annotation': v}),
|
|
242
|
+
doc="Annotation of the buffer.")
|
|
243
|
+
|
|
244
|
+
@property
|
|
245
|
+
def name(self):
|
|
246
|
+
return self.__name
|
|
247
|
+
|
|
222
248
|
@name.setter
|
|
223
249
|
def name(self, v):
|
|
224
250
|
self.__name = v
|
|
@@ -278,28 +304,6 @@ class AxesImagePhantom:
|
|
|
278
304
|
"""Page number in the parent book."""
|
|
279
305
|
return self.parent.index(self)
|
|
280
306
|
|
|
281
|
-
def update_buffer(self, buf=None):
|
|
282
|
-
"""Update buffer and the image (internal use only)."""
|
|
283
|
-
if buf is not None:
|
|
284
|
-
self.__buf = _to_buffer(buf)
|
|
285
|
-
|
|
286
|
-
bins, vlim, img = _to_image(self.__buf,
|
|
287
|
-
cutoff = self.parent.score_percentile,
|
|
288
|
-
threshold = self.parent.nbytes_threshold,
|
|
289
|
-
)
|
|
290
|
-
self.__bins = bins
|
|
291
|
-
self.__vlim = vlim
|
|
292
|
-
self.__art.set_array(img)
|
|
293
|
-
self.parent.handler('frame_modified', self)
|
|
294
|
-
|
|
295
|
-
def update_extent(self):
|
|
296
|
-
"""Update logical extent of the image (internal use only)."""
|
|
297
|
-
h, w = self.__buf.shape[:2]
|
|
298
|
-
ux, uy = self.xy_unit
|
|
299
|
-
w *= ux/2
|
|
300
|
-
h *= uy/2
|
|
301
|
-
self.__art.set_extent((-w,w,-h,h))
|
|
302
|
-
|
|
303
307
|
@property
|
|
304
308
|
def roi(self):
|
|
305
309
|
"""Current buffer ROI (region of interest)."""
|
|
@@ -315,9 +319,14 @@ class AxesImagePhantom:
|
|
|
315
319
|
self.roi[:] = v # cannot broadcast input array into different shape
|
|
316
320
|
self.update_buffer()
|
|
317
321
|
|
|
322
|
+
@property
|
|
323
|
+
def buffer(self):
|
|
324
|
+
return self.__buf
|
|
325
|
+
|
|
318
326
|
@buffer.setter
|
|
319
327
|
def buffer(self, v):
|
|
320
328
|
self.update_buffer(v)
|
|
329
|
+
self.update_extent()
|
|
321
330
|
|
|
322
331
|
def xytoc(self, x, y=None, nearest=True):
|
|
323
332
|
"""Convert xydata (x,y) -> data[(x,y)] value of neaerst pixel.
|
|
@@ -618,12 +627,13 @@ class GraphPlot(MatplotPanel):
|
|
|
618
627
|
- aspect : aspect ratio
|
|
619
628
|
- pathname : full path of the buffer file
|
|
620
629
|
"""
|
|
621
|
-
if buf is None:
|
|
622
|
-
return
|
|
623
|
-
|
|
624
630
|
if isinstance(buf, str):
|
|
625
631
|
buf = Image.open(buf)
|
|
626
632
|
|
|
633
|
+
if not isinstance(buf, (np.ndarray, Image.Image, wx.Bitmap, wx.Image)):
|
|
634
|
+
warn("Load targets must be either arrays or images.")
|
|
635
|
+
return None
|
|
636
|
+
|
|
627
637
|
pathname = kwargs.get('pathname')
|
|
628
638
|
paths = [art.pathname for art in self.__Arts]
|
|
629
639
|
names = [art.name for art in self.__Arts]
|
|
@@ -687,9 +697,6 @@ class GraphPlot(MatplotPanel):
|
|
|
687
697
|
j = self.index(j)
|
|
688
698
|
|
|
689
699
|
buffers = [art.buffer for art in self.__Arts]
|
|
690
|
-
if hasattr(j, '__iter__'):
|
|
691
|
-
return [buffers[i] for i in j]
|
|
692
|
-
|
|
693
700
|
return buffers[j] # j can also be slicing
|
|
694
701
|
|
|
695
702
|
def __setitem__(self, j, v):
|
|
@@ -699,14 +706,14 @@ class GraphPlot(MatplotPanel):
|
|
|
699
706
|
except ValueError:
|
|
700
707
|
return self.load(v, name=j) # new buffer
|
|
701
708
|
|
|
702
|
-
if
|
|
703
|
-
raise ValueError("attempt to assign buffers
|
|
709
|
+
if isinstance(j, slice):
|
|
710
|
+
raise ValueError("attempt to assign buffers via slicing")
|
|
704
711
|
|
|
705
712
|
if v is None:
|
|
706
|
-
|
|
713
|
+
raise ValueError("values must be buffers, not NoneType.")
|
|
707
714
|
else:
|
|
708
715
|
art = self.__Arts[j]
|
|
709
|
-
art.update_buffer(v)
|
|
716
|
+
art.update_buffer(v) # update buffer
|
|
710
717
|
art.update_extent()
|
|
711
718
|
self.select(j)
|
|
712
719
|
|
|
@@ -714,9 +721,7 @@ class GraphPlot(MatplotPanel):
|
|
|
714
721
|
if isinstance(j, str):
|
|
715
722
|
j = self.index(j)
|
|
716
723
|
|
|
717
|
-
if
|
|
718
|
-
arts = [self.__Arts[i] for i in j]
|
|
719
|
-
elif isinstance(j, slice):
|
|
724
|
+
if isinstance(j, slice):
|
|
720
725
|
arts = self.__Arts[j]
|
|
721
726
|
else:
|
|
722
727
|
arts = [self.__Arts[j]]
|
|
@@ -784,16 +789,27 @@ class GraphPlot(MatplotPanel):
|
|
|
784
789
|
if self.__Arts and self.__index is not None:
|
|
785
790
|
return self.__Arts[self.__index]
|
|
786
791
|
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
+
@property
|
|
793
|
+
def buffer(self):
|
|
794
|
+
"""Current buffer array."""
|
|
795
|
+
if self.frame:
|
|
796
|
+
return self.frame.buffer
|
|
792
797
|
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
798
|
+
@buffer.setter
|
|
799
|
+
def buffer(self, v):
|
|
800
|
+
if self.frame:
|
|
801
|
+
self.__setitem__(self.__index, v)
|
|
802
|
+
else:
|
|
803
|
+
self.load(v)
|
|
804
|
+
|
|
805
|
+
@property
|
|
806
|
+
def newbuffer(self):
|
|
807
|
+
"""New buffer loader."""
|
|
808
|
+
return None
|
|
809
|
+
|
|
810
|
+
@newbuffer.setter
|
|
811
|
+
def newbuffer(self, v):
|
|
812
|
+
self.load(v)
|
|
797
813
|
|
|
798
814
|
@property
|
|
799
815
|
def unit(self):
|
|
@@ -816,8 +832,8 @@ class GraphPlot(MatplotPanel):
|
|
|
816
832
|
self.canvas.draw_idle()
|
|
817
833
|
|
|
818
834
|
def kill_buffer(self):
|
|
819
|
-
if self.
|
|
820
|
-
del self.
|
|
835
|
+
if self.frame:
|
|
836
|
+
del self[self.__index]
|
|
821
837
|
|
|
822
838
|
def kill_buffer_all(self):
|
|
823
839
|
del self[:]
|
|
@@ -951,7 +967,7 @@ class GraphPlot(MatplotPanel):
|
|
|
951
967
|
data = frame.roi
|
|
952
968
|
GraphPlot.clipboard_name = name
|
|
953
969
|
GraphPlot.clipboard_data = data
|
|
954
|
-
bins, vlim, img = _to_image(data, frame.
|
|
970
|
+
bins, vlim, img = _to_image(data, frame.cuts)
|
|
955
971
|
Clipboard.imwrite(img)
|
|
956
972
|
self.message("Write buffer to clipboard.")
|
|
957
973
|
except Exception as e:
|
mwx/nutshell.py
CHANGED
|
@@ -33,7 +33,8 @@ from .framework import CtrlInterface, AuiNotebook, Menu
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
## URL pattern (flag = re.M | re.A)
|
|
36
|
-
url_re = r"https?://[\w/:%#$&?()~.=+-]+"
|
|
36
|
+
## url_re = r"https?://[\w/:%#$&?()~.=+-]+"
|
|
37
|
+
url_re = r"https?://[\w/:%#$&?~.=+-]+" # excluding ()
|
|
37
38
|
|
|
38
39
|
## no-file pattern
|
|
39
40
|
nofile_re = r'[\/:*?"<>|]'
|
|
@@ -630,7 +631,7 @@ class EditorInterface(AutoCompInterfaceMixin, CtrlInterface):
|
|
|
630
631
|
|
|
631
632
|
## Custom indicators ([BUG] indicator=1 is reset when the buffer is udpated.)
|
|
632
633
|
## [10-11] filter_text
|
|
633
|
-
## [2] URL
|
|
634
|
+
## [2] URL
|
|
634
635
|
## [3] match_paren
|
|
635
636
|
self.IndicatorSetStyle(10, stc.STC_INDIC_TEXTFORE)
|
|
636
637
|
self.IndicatorSetForeground(10, "red")
|
|
@@ -1725,16 +1726,15 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1725
1726
|
self.__path = Path(fn)
|
|
1726
1727
|
if self.__path.is_file():
|
|
1727
1728
|
self.__mtime = self.__path.stat().st_mtime # update timestamp (modified time)
|
|
1729
|
+
elif re.match(url_re, fn):
|
|
1730
|
+
self.__mtime = -1
|
|
1728
1731
|
else:
|
|
1729
|
-
|
|
1730
|
-
self.
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
self.__mtime = False
|
|
1736
|
-
except Exception:
|
|
1737
|
-
self.__mtime = None
|
|
1732
|
+
try:
|
|
1733
|
+
self.__path.resolve(True) # Check if the path format is valid.
|
|
1734
|
+
except FileNotFoundError:
|
|
1735
|
+
self.__mtime = False # valid path (but not found)
|
|
1736
|
+
except OSError:
|
|
1737
|
+
self.__mtime = None # *invalid path*
|
|
1738
1738
|
if self.__filename != fn:
|
|
1739
1739
|
self.__filename = fn
|
|
1740
1740
|
self.update_caption()
|
|
@@ -1751,10 +1751,11 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1751
1751
|
"""
|
|
1752
1752
|
try:
|
|
1753
1753
|
return self.__path.stat().st_mtime - self.__mtime
|
|
1754
|
-
except
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1754
|
+
except FileNotFoundError:
|
|
1755
|
+
self.__mtime = False # valid path (but not found)
|
|
1756
|
+
except OSError:
|
|
1757
|
+
pass
|
|
1758
|
+
return self.__mtime
|
|
1758
1759
|
|
|
1759
1760
|
@property
|
|
1760
1761
|
def need_buffer_save(self):
|
|
@@ -1962,20 +1963,20 @@ class Buffer(EditorInterface, EditWindow):
|
|
|
1962
1963
|
## Processing text selection, dragging, or dragging+
|
|
1963
1964
|
evt.Skip()
|
|
1964
1965
|
return
|
|
1966
|
+
|
|
1965
1967
|
pos = evt.Position
|
|
1968
|
+
self.goto_char(pos) # Clear selection
|
|
1966
1969
|
i = 2
|
|
1967
1970
|
if self.IndicatorValueAt(i, pos): # [C-indic click]
|
|
1968
1971
|
p = self.IndicatorStart(i, pos)
|
|
1969
1972
|
q = self.IndicatorEnd(i, pos)
|
|
1970
1973
|
url = self.GetTextRange(p, q).strip()
|
|
1971
|
-
self.message("URL {!r}".format(url))
|
|
1972
1974
|
if wx.GetKeyState(wx.WXK_SHIFT): # [C-S-indic click]
|
|
1973
1975
|
import webbrowser
|
|
1974
1976
|
return webbrowser.open(url)
|
|
1975
1977
|
else:
|
|
1976
1978
|
## Note: post-call for the confirmation dialog.
|
|
1977
1979
|
wx.CallAfter(self.parent.load_file, url)
|
|
1978
|
-
self.anchor = pos # Clear selection
|
|
1979
1980
|
|
|
1980
1981
|
def on_modified(self, buf):
|
|
1981
1982
|
"""Called when the buffer is modified."""
|
|
@@ -2416,8 +2417,8 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2416
2417
|
buf._load_textfile(res.text, filename)
|
|
2417
2418
|
self.swap_buffer(buf, lineno)
|
|
2418
2419
|
return True
|
|
2419
|
-
|
|
2420
|
-
|
|
2420
|
+
## raise Exception("URL not found:", filename)
|
|
2421
|
+
res.raise_for_status() # raise HTTP error
|
|
2421
2422
|
if buf._load_file(filename):
|
|
2422
2423
|
self.swap_buffer(buf, lineno)
|
|
2423
2424
|
return True
|
mwx/wxpdb.py
CHANGED
|
@@ -53,7 +53,6 @@ class Debugger(Pdb):
|
|
|
53
53
|
use_rawinput = False
|
|
54
54
|
prompt = property(lambda self: self.indents + '(Pdb) ',
|
|
55
55
|
lambda self,v: None) # fake setter
|
|
56
|
-
parent = property(lambda self: self.__shellframe)
|
|
57
56
|
handler = property(lambda self: self.__handler)
|
|
58
57
|
|
|
59
58
|
@property
|
|
@@ -90,12 +89,12 @@ class Debugger(Pdb):
|
|
|
90
89
|
def __init__(self, parent, *args, **kwargs):
|
|
91
90
|
Pdb.__init__(self, *args, **kwargs)
|
|
92
91
|
|
|
93
|
-
self.
|
|
94
|
-
self.__hookpoint = None
|
|
92
|
+
self.parent = parent
|
|
95
93
|
self.indents = ' ' * 2
|
|
96
94
|
self.interactive_shell = parent.rootshell
|
|
97
95
|
self.editor = None
|
|
98
96
|
self.code = None
|
|
97
|
+
self.__hookpoint = None
|
|
99
98
|
|
|
100
99
|
def _input(msg):
|
|
101
100
|
## redirects input such as cl(ear)
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=pS7ZG8QKRypiFFiaWAq_opBB6I_1viZ0zUMk2TbjzE0,667
|
|
2
2
|
mwx/bookshelf.py,sha256=b_TMDaNIzLHoL0xbbqb3tt0BnRvhLAqaCn_pBdrigZw,7523
|
|
3
3
|
mwx/controls.py,sha256=X4zx2h6oggUsQxi2PRk4RUsJieYTmcAPIvWwaz-ysTI,48107
|
|
4
|
-
mwx/framework.py,sha256=
|
|
4
|
+
mwx/framework.py,sha256=8Vh1Tkqod9sWp81ObY5Ofcqto_UJerT_VtEgA97huoA,76125
|
|
5
5
|
mwx/graphman.py,sha256=RqD0W9I2BvJ3Q2kyMiyyg4n-T4-_x7PDuCI5bGAg5k4,70110
|
|
6
6
|
mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
|
|
7
|
-
mwx/matplot2.py,sha256=
|
|
8
|
-
mwx/matplot2g.py,sha256=
|
|
7
|
+
mwx/matplot2.py,sha256=Zwte-wwzCg_OHzsBniVgKdaNLzsvJaa1gc0n7VdAqxw,33150
|
|
8
|
+
mwx/matplot2g.py,sha256=tp0KD_dqDgupTVROY4YFZyfvHS_d21w4uS3x0Sd_zSA,64643
|
|
9
9
|
mwx/matplot2lg.py,sha256=JRWjWnLJUytbSq6wxs4P0gbVUr3xoLSF6Wwqd5V_pJI,27404
|
|
10
10
|
mwx/mgplt.py,sha256=8mXbHpCmm7lz3XbAxOg7IVC7DaSGBEby1UfTlMl9kjk,5604
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
11
|
+
mwx/nutshell.py,sha256=7nQ7UUFM9kvjDjHNUEdOkkeqZPiU6zOERwamqBdJpQs,140856
|
|
12
12
|
mwx/testsuite.py,sha256=kiM3-BVhr42LRRN7xG7pYl3at8o2vnypWSxD8KRvA7c,1228
|
|
13
13
|
mwx/utilus.py,sha256=HFvP682SyeSp8yNfUrdUXPhWdLuWVlsUSg6LqNBJOT8,37451
|
|
14
14
|
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
15
|
-
mwx/wxpdb.py,sha256=
|
|
15
|
+
mwx/wxpdb.py,sha256=ge4hNfeigHGcpnioU1B_BJX_QZjNdtnokUrcZOxcEcI,18814
|
|
16
16
|
mwx/wxwil.py,sha256=hhyB1lPrF9ixeObxCOKQv0Theu-B-kpJg_yVU3EGSNg,5406
|
|
17
17
|
mwx/wxwit.py,sha256=1hHtMi2YEy2T_LnUpwdmrIdtCuvxMOFyykqnbq6jLP0,7294
|
|
18
18
|
mwx/plugins/__init__.py,sha256=jnJ-Sl9XJ_7BFDslD_r7dsbxsOT57q_IaEriV53XIGY,41
|
|
@@ -22,8 +22,8 @@ mwx/plugins/frame_listview.py,sha256=gowjQ-ARNonMkDSXkQgPKq4U9YBJ-vQ0jK2krBVOdCs
|
|
|
22
22
|
mwx/plugins/line_profile.py,sha256=zzm6_7lnAnNepLbh07ordp3nRWDFQJtu719ZVjrVf8s,819
|
|
23
23
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
24
24
|
mwx/py/filling.py,sha256=fumUG1F5M9TL-Dfqni4G85uk7TmvnUunTbdcPDV0vfo,16857
|
|
25
|
-
mwxlib-1.2.
|
|
26
|
-
mwxlib-1.2.
|
|
27
|
-
mwxlib-1.2.
|
|
28
|
-
mwxlib-1.2.
|
|
29
|
-
mwxlib-1.2.
|
|
25
|
+
mwxlib-1.2.4.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
26
|
+
mwxlib-1.2.4.dist-info/METADATA,sha256=jgZUZOULgdBFRgLPPjGzxfiPOsz4xdibdZgiXipWvK0,7258
|
|
27
|
+
mwxlib-1.2.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
28
|
+
mwxlib-1.2.4.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
29
|
+
mwxlib-1.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|