mwxlib 1.2.8__py3-none-any.whl → 1.2.9__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 +0 -4
- mwx/framework.py +2 -2
- mwx/nutshell.py +13 -8
- {mwxlib-1.2.8.dist-info → mwxlib-1.2.9.dist-info}/METADATA +11 -2
- {mwxlib-1.2.8.dist-info → mwxlib-1.2.9.dist-info}/RECORD +8 -8
- {mwxlib-1.2.8.dist-info → mwxlib-1.2.9.dist-info}/WHEEL +1 -1
- {mwxlib-1.2.8.dist-info → mwxlib-1.2.9.dist-info}/LICENSE +0 -0
- {mwxlib-1.2.8.dist-info → mwxlib-1.2.9.dist-info}/top_level.txt +0 -0
mwx/controls.py
CHANGED
|
@@ -337,13 +337,9 @@ class Knob(wx.Panel):
|
|
|
337
337
|
label = self.__par.name + ' '
|
|
338
338
|
|
|
339
339
|
if style == 'chkbox' or style == 'checkbox':
|
|
340
|
-
if lw >= 0:
|
|
341
|
-
lw += 16
|
|
342
340
|
self.label = wx.CheckBox(self, label=label, size=(lw,-1))
|
|
343
341
|
self.label.Bind(wx.EVT_CHECKBOX, self.OnCheck)
|
|
344
342
|
elif style == 'button':
|
|
345
|
-
if lw >= 0:
|
|
346
|
-
lw += 16
|
|
347
343
|
self.label = pb.PlateButton(self, label=label, size=(lw,-1),
|
|
348
344
|
style=pb.PB_STYLE_DEFAULT|pb.PB_STYLE_SQUARE)
|
|
349
345
|
self.label.Bind(wx.EVT_BUTTON, self.OnPress)
|
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "1.2.
|
|
4
|
+
__version__ = "1.2.9"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from contextlib import contextmanager
|
|
@@ -1484,7 +1484,7 @@ class ShellFrame(MiniFrame):
|
|
|
1484
1484
|
style=wx.YES_NO|wx.ICON_INFORMATION) != wx.YES:
|
|
1485
1485
|
self.__autoload = False # Don't ask any more.
|
|
1486
1486
|
return
|
|
1487
|
-
book.load_file(buf.filename)
|
|
1487
|
+
book.load_file(buf.filename, buf.markline+1)
|
|
1488
1488
|
## Reinitialize self-specific builtins if other instances are destroyed.
|
|
1489
1489
|
if evt.Active:
|
|
1490
1490
|
self.Init()
|
mwx/nutshell.py
CHANGED
|
@@ -2390,7 +2390,7 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2390
2390
|
return True
|
|
2391
2391
|
return False
|
|
2392
2392
|
|
|
2393
|
-
def load_file(self, filename, lineno=0, verbose=True):
|
|
2393
|
+
def load_file(self, filename, lineno=0, verbose=True, **kwargs):
|
|
2394
2394
|
"""Load a file into an existing or new buffer.
|
|
2395
2395
|
The requests module is required to use URL extension.
|
|
2396
2396
|
"""
|
|
@@ -2412,18 +2412,18 @@ class EditorBook(AuiNotebook, CtrlInterface):
|
|
|
2412
2412
|
try:
|
|
2413
2413
|
if re.match(url_re, filename):
|
|
2414
2414
|
import requests
|
|
2415
|
-
|
|
2416
|
-
|
|
2415
|
+
kwargs.setdefault('timeout', 3.0)
|
|
2416
|
+
res = requests.get(filename, **kwargs)
|
|
2417
|
+
if res.status_code == requests.codes.OK:
|
|
2417
2418
|
buf._load_textfile(res.text, filename)
|
|
2418
2419
|
self.swap_buffer(buf, lineno)
|
|
2419
2420
|
return True
|
|
2420
|
-
|
|
2421
|
-
res.raise_for_status() # raise HTTP error
|
|
2421
|
+
res.raise_for_status() # raise HTTP error; don't catch here.
|
|
2422
2422
|
if buf._load_file(filename):
|
|
2423
2423
|
self.swap_buffer(buf, lineno)
|
|
2424
2424
|
return True
|
|
2425
2425
|
return False
|
|
2426
|
-
except (OSError, UnicodeDecodeError) as e:
|
|
2426
|
+
except (OSError, UnicodeDecodeError, ModuleNotFoundError) as e:
|
|
2427
2427
|
self.post_message("Failed to load:", e)
|
|
2428
2428
|
self.delete_buffer(buf)
|
|
2429
2429
|
return False
|
|
@@ -3354,7 +3354,7 @@ class Nautilus(EditorInterface, Shell):
|
|
|
3354
3354
|
## cf. getMultilineCommand() -> caret-multi-line that starts with a prompt
|
|
3355
3355
|
## [BUG 4.1.1] Don't use for current prompt --> Fixed in 4.2.0.
|
|
3356
3356
|
|
|
3357
|
-
def getMultilineCommand(self):
|
|
3357
|
+
def getMultilineCommand(self, rstrip=True):
|
|
3358
3358
|
"""Extract a multi-line command which starts with a prompt.
|
|
3359
3359
|
|
|
3360
3360
|
(override) Don't remove trailing ps2 + spaces.
|
|
@@ -3364,7 +3364,12 @@ class Nautilus(EditorInterface, Shell):
|
|
|
3364
3364
|
if region:
|
|
3365
3365
|
p, q = (self.PositionFromLine(x) for x in region)
|
|
3366
3366
|
p += len(sys.ps1)
|
|
3367
|
-
|
|
3367
|
+
command = self.GetTextRange(p, q).rstrip(os.linesep) # remove the last cr/lf
|
|
3368
|
+
if rstrip:
|
|
3369
|
+
command = command.replace(os.linesep + sys.ps2, '\n')
|
|
3370
|
+
command = command.rstrip()
|
|
3371
|
+
command = command.replace('\n', os.linesep + sys.ps2)
|
|
3372
|
+
return command
|
|
3368
3373
|
return ''
|
|
3369
3374
|
|
|
3370
3375
|
def get_region(self, line):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: mwxlib
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.9
|
|
4
4
|
Summary: A wrapper of matplotlib and wxPython (phoenix)
|
|
5
5
|
Home-page: https://github.com/komoto48g/mwxlib
|
|
6
6
|
Author: Kazuya O'moto
|
|
@@ -21,6 +21,15 @@ Requires-Dist: wxpython>=4.2.0
|
|
|
21
21
|
Requires-Dist: matplotlib
|
|
22
22
|
Requires-Dist: opencv-python
|
|
23
23
|
Requires-Dist: scipy
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: author-email
|
|
26
|
+
Dynamic: classifier
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: home-page
|
|
30
|
+
Dynamic: license
|
|
31
|
+
Dynamic: requires-dist
|
|
32
|
+
Dynamic: summary
|
|
24
33
|
|
|
25
34
|
# mwxlib
|
|
26
35
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=pS7ZG8QKRypiFFiaWAq_opBB6I_1viZ0zUMk2TbjzE0,667
|
|
2
2
|
mwx/bookshelf.py,sha256=b_TMDaNIzLHoL0xbbqb3tt0BnRvhLAqaCn_pBdrigZw,7523
|
|
3
|
-
mwx/controls.py,sha256=
|
|
4
|
-
mwx/framework.py,sha256=
|
|
3
|
+
mwx/controls.py,sha256=iSevLKxgB3vdGJr3Wv8nccbFNSw1Voazt_HYjp3RrmM,48044
|
|
4
|
+
mwx/framework.py,sha256=FU5XzSPNg-vWZPvG8lMi7u5htB3aUkdKgpbXlSqIFEU,76141
|
|
5
5
|
mwx/graphman.py,sha256=sKwPy31H4lwtShTAui_6upe_Ys2-MwBHhdFq-3onBNE,70328
|
|
6
6
|
mwx/images.py,sha256=oxCn0P-emiWujSS2gUgU5TUnr5cPjix2jBcjOBDr24I,48701
|
|
7
7
|
mwx/matplot2.py,sha256=Zwte-wwzCg_OHzsBniVgKdaNLzsvJaa1gc0n7VdAqxw,33150
|
|
8
8
|
mwx/matplot2g.py,sha256=ceeAjFkrDz49aSLo_9dIWZZd4HhnSjxe8u9G_ipBHek,64195
|
|
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=Cy2P4XZ0Wife66oXv3I0dRztlBmlSAlUkVhOq2tWPgs,141187
|
|
12
12
|
mwx/testsuite.py,sha256=kiM3-BVhr42LRRN7xG7pYl3at8o2vnypWSxD8KRvA7c,1228
|
|
13
13
|
mwx/utilus.py,sha256=bDeooo2bOcZwvkIdi0ElkT-qoblqzHNFsIveb72NFOo,37528
|
|
14
14
|
mwx/wxmon.py,sha256=yzWqrbY6LzpfRwQeytYUeqFhFuLVm_XEvrVAL_k0HBQ,12756
|
|
@@ -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.9.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
26
|
+
mwxlib-1.2.9.dist-info/METADATA,sha256=zDuA9RxTUziGyT-aTZFZhLSh2fN1_USrpr6lpoTLuT0,7456
|
|
27
|
+
mwxlib-1.2.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
28
|
+
mwxlib-1.2.9.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
29
|
+
mwxlib-1.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|