mwxlib 0.97.2__py3-none-any.whl → 0.97.3__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/matplot2g.py +17 -9
- mwx/nutshell.py +10 -5
- {mwxlib-0.97.2.dist-info → mwxlib-0.97.3.dist-info}/METADATA +1 -1
- {mwxlib-0.97.2.dist-info → mwxlib-0.97.3.dist-info}/RECORD +8 -8
- {mwxlib-0.97.2.dist-info → mwxlib-0.97.3.dist-info}/LICENSE +0 -0
- {mwxlib-0.97.2.dist-info → mwxlib-0.97.3.dist-info}/WHEEL +0 -0
- {mwxlib-0.97.2.dist-info → mwxlib-0.97.3.dist-info}/top_level.txt +0 -0
mwx/framework.py
CHANGED
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
|
-
from .utilus import warn
|
|
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
|
|
@@ -46,6 +46,12 @@ def _to_buffer(img):
|
|
|
46
46
|
return img
|
|
47
47
|
|
|
48
48
|
|
|
49
|
+
def _to_array(x):
|
|
50
|
+
if isinstance(x, (list, tuple)):
|
|
51
|
+
x = np.array(x)
|
|
52
|
+
return x
|
|
53
|
+
|
|
54
|
+
|
|
49
55
|
def imconvert(src, cutoff=0, threshold=None, binning=1):
|
|
50
56
|
"""Convert buffer to image<uint8>
|
|
51
57
|
|
|
@@ -325,15 +331,16 @@ class AxesImagePhantom(object):
|
|
|
325
331
|
return self.__buf[ny, nx] # nearest value
|
|
326
332
|
return ndi.map_coordinates(self.__buf, np.vstack((ny, nx))) # spline value
|
|
327
333
|
|
|
328
|
-
def xytopixel(self, x, y, cast=True):
|
|
334
|
+
def xytopixel(self, x, y=None, cast=True):
|
|
329
335
|
"""Convert xydata (x,y) -> [nx,ny] pixel.
|
|
330
336
|
If cast, convert pixel-based lengths to pixel numbers.
|
|
331
337
|
"""
|
|
332
338
|
def _cast(n):
|
|
333
339
|
return np.int32(np.floor(np.round(n, 1)))
|
|
334
|
-
if
|
|
335
|
-
|
|
336
|
-
y =
|
|
340
|
+
if y is None:
|
|
341
|
+
## warn("Setting xy data with single tuple.", DeprecationWarning)
|
|
342
|
+
x, y = x
|
|
343
|
+
x, y = _to_array(x), _to_array(y)
|
|
337
344
|
l,r,b,t = self.__art.get_extent()
|
|
338
345
|
ux, uy = self.xy_unit
|
|
339
346
|
nx = (x - l) / ux
|
|
@@ -342,11 +349,12 @@ class AxesImagePhantom(object):
|
|
|
342
349
|
return (_cast(nx), _cast(ny))
|
|
343
350
|
return (nx-0.5, ny-0.5)
|
|
344
351
|
|
|
345
|
-
def xyfrompixel(self, nx, ny):
|
|
352
|
+
def xyfrompixel(self, nx, ny=None):
|
|
346
353
|
"""Convert pixel [nx,ny] -> (x,y) xydata (float number)."""
|
|
347
|
-
if
|
|
348
|
-
|
|
349
|
-
ny =
|
|
354
|
+
if ny is None:
|
|
355
|
+
## warn("Setting xy data with single tuple.", DeprecationWarning)
|
|
356
|
+
nx, ny = nx
|
|
357
|
+
nx, ny = _to_array(nx), _to_array(ny)
|
|
350
358
|
l,r,b,t = self.__art.get_extent()
|
|
351
359
|
ux, uy = self.xy_unit
|
|
352
360
|
x = l + (nx + 0.5) * ux
|
mwx/nutshell.py
CHANGED
|
@@ -1415,7 +1415,7 @@ class Buffer(EditWindow, EditorInterface):
|
|
|
1415
1415
|
return os.path.getmtime(fn) - self.__mtime
|
|
1416
1416
|
if re.match(url_re, fn):
|
|
1417
1417
|
return -1
|
|
1418
|
-
return None
|
|
1418
|
+
return self.__mtime # None or specified value
|
|
1419
1419
|
|
|
1420
1420
|
@property
|
|
1421
1421
|
def caption_prefix(self):
|
|
@@ -1481,12 +1481,14 @@ class Buffer(EditWindow, EditorInterface):
|
|
|
1481
1481
|
self.Bind(stc.EVT_STC_SAVEPOINTREACHED, self.OnSavePointReached)
|
|
1482
1482
|
|
|
1483
1483
|
def activate(evt):
|
|
1484
|
-
|
|
1484
|
+
if self:
|
|
1485
|
+
self.handler('buffer_activated', self)
|
|
1485
1486
|
evt.Skip()
|
|
1486
1487
|
self.Bind(wx.EVT_SET_FOCUS, activate)
|
|
1487
1488
|
|
|
1488
1489
|
def inactivate(evt):
|
|
1489
|
-
|
|
1490
|
+
if self:
|
|
1491
|
+
self.handler('buffer_inactivated', self)
|
|
1490
1492
|
evt.Skip()
|
|
1491
1493
|
self.Bind(wx.EVT_KILL_FOCUS, inactivate)
|
|
1492
1494
|
|
|
@@ -2018,6 +2020,7 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2018
2020
|
return
|
|
2019
2021
|
if not self.load_file(filename):
|
|
2020
2022
|
buf = self.create_buffer(filename)
|
|
2023
|
+
buf._Buffer__mtime = 0 # => need_buffer_save
|
|
2021
2024
|
self.swap_buffer(buf)
|
|
2022
2025
|
|
|
2023
2026
|
open_buffer = find_file # for backward compatibility
|
|
@@ -2370,12 +2373,14 @@ class Nautilus(Shell, EditorInterface):
|
|
|
2370
2373
|
self.Bind(wx.EVT_WINDOW_DESTROY, self.OnDestroy)
|
|
2371
2374
|
|
|
2372
2375
|
def activate(evt):
|
|
2373
|
-
|
|
2376
|
+
if self:
|
|
2377
|
+
self.handler('shell_activated', self)
|
|
2374
2378
|
evt.Skip()
|
|
2375
2379
|
self.Bind(wx.EVT_SET_FOCUS, activate)
|
|
2376
2380
|
|
|
2377
2381
|
def inactivate(evt):
|
|
2378
|
-
|
|
2382
|
+
if self:
|
|
2383
|
+
self.handler('shell_inactivated', self)
|
|
2379
2384
|
evt.Skip()
|
|
2380
2385
|
self.Bind(wx.EVT_KILL_FOCUS, inactivate)
|
|
2381
2386
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
|
|
2
2
|
mwx/bookshelf.py,sha256=ILKB13hX4riJnYFJmUvu2b1xa4uz8KxA1ZVuf4Y1zqM,5136
|
|
3
3
|
mwx/controls.py,sha256=KAnzk2EeiBZsvJkfIHKIXo8bhxc6uVpC5CW802657ow,47815
|
|
4
|
-
mwx/framework.py,sha256=
|
|
4
|
+
mwx/framework.py,sha256=ro-UOz8GFUmBqiKAst5DIRcboRJ0_x2KXGjoGctBAkA,75249
|
|
5
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=wiZFDFuQe3ax71fmyeR_9hvAmgT-4nVfZ30UByv8Nv8,64379
|
|
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=4mUQCvtE0SZxlHRflrgKYGlMgvj2HY9LtBhAm9Rnnd8,137518
|
|
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
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=hbApzZWa9-BmQthu7uZBlBbGbtf4iJ_prO8IhxoGMs8
|
|
|
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.97.
|
|
25
|
-
mwxlib-0.97.
|
|
26
|
-
mwxlib-0.97.
|
|
27
|
-
mwxlib-0.97.
|
|
28
|
-
mwxlib-0.97.
|
|
24
|
+
mwxlib-0.97.3.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.97.3.dist-info/METADATA,sha256=Q10wJtVKCVOVctcuIDSFiyDADO0rlPKp8Ga-PLxOTKI,1880
|
|
26
|
+
mwxlib-0.97.3.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
|
27
|
+
mwxlib-0.97.3.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.97.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|