mwxlib 0.94.6__py3-none-any.whl → 0.94.7__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 +24 -35
- mwx/nutshell.py +4 -4
- {mwxlib-0.94.6.dist-info → mwxlib-0.94.7.dist-info}/METADATA +1 -1
- {mwxlib-0.94.6.dist-info → mwxlib-0.94.7.dist-info}/RECORD +7 -7
- {mwxlib-0.94.6.dist-info → mwxlib-0.94.7.dist-info}/LICENSE +0 -0
- {mwxlib-0.94.6.dist-info → mwxlib-0.94.7.dist-info}/WHEEL +0 -0
- {mwxlib-0.94.6.dist-info → mwxlib-0.94.7.dist-info}/top_level.txt +0 -0
mwx/framework.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#! python3
|
|
2
2
|
"""mwxlib framework.
|
|
3
3
|
"""
|
|
4
|
-
__version__ = "0.94.
|
|
4
|
+
__version__ = "0.94.7"
|
|
5
5
|
__author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
|
|
6
6
|
|
|
7
7
|
from functools import wraps, partial
|
|
@@ -1291,8 +1291,8 @@ class ShellFrame(MiniFrame):
|
|
|
1291
1291
|
self.SCRATCH_FILE = get_rootpath("scratch.py")
|
|
1292
1292
|
self.LOGGING_FILE = get_rootpath("deb-logging.log")
|
|
1293
1293
|
|
|
1294
|
-
|
|
1295
|
-
|
|
1294
|
+
self.load_session(
|
|
1295
|
+
os.path.abspath(debrc) if debrc else self.SESSION_FILE)
|
|
1296
1296
|
|
|
1297
1297
|
def load_session(self, filename):
|
|
1298
1298
|
"""Load session from file."""
|
|
@@ -1348,9 +1348,9 @@ class ShellFrame(MiniFrame):
|
|
|
1348
1348
|
"self.ghost.SetSelection({})".format(self.ghost.Selection),
|
|
1349
1349
|
"self.watcher.SetSelection({})".format(self.watcher.Selection),
|
|
1350
1350
|
## Note: Perspectives should be called after all pages have been added.
|
|
1351
|
-
"self._mgr.LoadPerspective
|
|
1352
|
-
"self.ghost.loadPerspective
|
|
1353
|
-
"self.watcher.loadPerspective
|
|
1351
|
+
"wx.CallAfter(self._mgr.LoadPerspective, {!r})".format(self._mgr.SavePerspective()),
|
|
1352
|
+
"wx.CallAfter(self.ghost.loadPerspective, {!r})".format(self.ghost.savePerspective()),
|
|
1353
|
+
"wx.CallAfter(self.watcher.loadPerspective, {!r})".format(self.watcher.savePerspective()),
|
|
1354
1354
|
"self._mgr.Update()\n",
|
|
1355
1355
|
)))
|
|
1356
1356
|
|
|
@@ -1544,17 +1544,12 @@ class ShellFrame(MiniFrame):
|
|
|
1544
1544
|
))
|
|
1545
1545
|
)
|
|
1546
1546
|
|
|
1547
|
-
def toggle_window(self, win
|
|
1548
|
-
self.
|
|
1547
|
+
def toggle_window(self, win):
|
|
1548
|
+
pane = self._mgr.GetPane(win)
|
|
1549
|
+
self.popup_window(win, not pane.IsShown())
|
|
1549
1550
|
|
|
1550
|
-
def popup_window(self, win, show=True
|
|
1551
|
-
"""Show the notebook page and
|
|
1552
|
-
|
|
1553
|
-
Args:
|
|
1554
|
-
win : window to popup
|
|
1555
|
-
show : True, False, otherwise None:toggle
|
|
1556
|
-
The pane window will be hidden if no show.
|
|
1557
|
-
"""
|
|
1551
|
+
def popup_window(self, win, show=True):
|
|
1552
|
+
"""Show the notebook page and keep the focus."""
|
|
1558
1553
|
wnd = wx.Window.FindFocus() # original focus
|
|
1559
1554
|
|
|
1560
1555
|
for pane in self._mgr.GetAllPanes():
|
|
@@ -1569,12 +1564,7 @@ class ShellFrame(MiniFrame):
|
|
|
1569
1564
|
else:
|
|
1570
1565
|
return # no such pane.window
|
|
1571
1566
|
|
|
1572
|
-
if
|
|
1573
|
-
show = not pane.IsShown() # toggle show
|
|
1574
|
-
|
|
1575
|
-
if focus and win.IsShown():
|
|
1576
|
-
win.SetFocus() # move focus
|
|
1577
|
-
elif wnd:
|
|
1567
|
+
if wnd:
|
|
1578
1568
|
wnd.SetFocus() # restore focus
|
|
1579
1569
|
|
|
1580
1570
|
## Modify the floating position of the pane when displayed.
|
|
@@ -1605,14 +1595,14 @@ class ShellFrame(MiniFrame):
|
|
|
1605
1595
|
self.indicator.Value = 1
|
|
1606
1596
|
self.message("Quit")
|
|
1607
1597
|
|
|
1608
|
-
def _load(self, filename, lineno, editor
|
|
1598
|
+
def _load(self, filename, lineno, editor):
|
|
1609
1599
|
"""Load file in the session (internal use only)."""
|
|
1610
1600
|
if isinstance(editor, str):
|
|
1611
1601
|
editor = getattr(self, editor, None)
|
|
1612
1602
|
if editor:
|
|
1613
|
-
return editor.load_file(filename, lineno, verbose)
|
|
1603
|
+
return editor.load_file(filename, lineno, verbose=0)
|
|
1614
1604
|
|
|
1615
|
-
def load(self, filename, lineno=0, show=True
|
|
1605
|
+
def load(self, filename, lineno=0, show=True):
|
|
1616
1606
|
"""Load file @where the object is defined.
|
|
1617
1607
|
|
|
1618
1608
|
Args:
|
|
@@ -1620,7 +1610,6 @@ class ShellFrame(MiniFrame):
|
|
|
1620
1610
|
It also supports <'filename:lineno'> format.
|
|
1621
1611
|
lineno : Set mark to lineno on load.
|
|
1622
1612
|
show : Show the page.
|
|
1623
|
-
focus : Focus the window if visible.
|
|
1624
1613
|
"""
|
|
1625
1614
|
if not isinstance(filename, str):
|
|
1626
1615
|
filename = where(filename)
|
|
@@ -1634,7 +1623,7 @@ class ShellFrame(MiniFrame):
|
|
|
1634
1623
|
editor = self.find_editor(filename) or self.Log
|
|
1635
1624
|
ret = editor.load_file(filename, lineno, verbose=1)
|
|
1636
1625
|
if ret:
|
|
1637
|
-
self.popup_window(editor, show
|
|
1626
|
+
self.popup_window(editor, show)
|
|
1638
1627
|
return ret
|
|
1639
1628
|
|
|
1640
1629
|
def info(self, obj):
|
|
@@ -1646,11 +1635,11 @@ class ShellFrame(MiniFrame):
|
|
|
1646
1635
|
def watch(self, obj):
|
|
1647
1636
|
if isinstance(obj, wx.Object):
|
|
1648
1637
|
self.monitor.watch(obj)
|
|
1649
|
-
self.popup_window(self.monitor
|
|
1638
|
+
self.popup_window(self.monitor)
|
|
1650
1639
|
elif hasattr(obj, '__dict__'):
|
|
1651
1640
|
self.linfo.watch(obj.__dict__)
|
|
1652
1641
|
self.ginfo.watch({})
|
|
1653
|
-
self.popup_window(self.linfo
|
|
1642
|
+
self.popup_window(self.linfo)
|
|
1654
1643
|
|
|
1655
1644
|
def highlight(self, obj, *args, **kwargs):
|
|
1656
1645
|
self.inspector.highlight(obj, *args, **kwargs)
|
|
@@ -1732,8 +1721,8 @@ class ShellFrame(MiniFrame):
|
|
|
1732
1721
|
shell.prompt()
|
|
1733
1722
|
shell.SetFocus()
|
|
1734
1723
|
self.Show()
|
|
1735
|
-
self.popup_window(self.ghost
|
|
1736
|
-
self.popup_window(self.linfo
|
|
1724
|
+
self.popup_window(self.ghost)
|
|
1725
|
+
self.popup_window(self.linfo)
|
|
1737
1726
|
self.add_log("<-- Beginning of debugger\r\n")
|
|
1738
1727
|
self.indicator.Value = 2
|
|
1739
1728
|
|
|
@@ -1749,7 +1738,7 @@ class ShellFrame(MiniFrame):
|
|
|
1749
1738
|
if self.linfo.target is not ls:
|
|
1750
1739
|
self.linfo.watch(ls)
|
|
1751
1740
|
self.on_title_window(frame)
|
|
1752
|
-
self.popup_window(self.debugger.editor
|
|
1741
|
+
self.popup_window(self.debugger.editor)
|
|
1753
1742
|
dispatcher.send(signal='Interpreter.push',
|
|
1754
1743
|
sender=shell, command=None, more=False)
|
|
1755
1744
|
command = shell.cmdline
|
|
@@ -1855,7 +1844,7 @@ class ShellFrame(MiniFrame):
|
|
|
1855
1844
|
with buf.off_readonly():
|
|
1856
1845
|
buf.SetText(text)
|
|
1857
1846
|
## Overwrite text and popup the window.
|
|
1858
|
-
self.popup_window(self.Help
|
|
1847
|
+
self.popup_window(self.Help)
|
|
1859
1848
|
|
|
1860
1849
|
def clone_shell(self, target):
|
|
1861
1850
|
if not hasattr(target, '__dict__'):
|
|
@@ -1865,8 +1854,8 @@ class ShellFrame(MiniFrame):
|
|
|
1865
1854
|
style=wx.CLIP_CHILDREN|wx.BORDER_NONE)
|
|
1866
1855
|
self.handler('shell_new', shell)
|
|
1867
1856
|
self.console.AddPage(shell, typename(shell.target))
|
|
1868
|
-
self.
|
|
1869
|
-
|
|
1857
|
+
self.popup_window(shell)
|
|
1858
|
+
shell.SetFocus()
|
|
1870
1859
|
return shell
|
|
1871
1860
|
|
|
1872
1861
|
def delete_shell(self, shell):
|
mwx/nutshell.py
CHANGED
|
@@ -1590,15 +1590,15 @@ class Buffer(EditWindow, EditorInterface):
|
|
|
1590
1590
|
self.Text = text
|
|
1591
1591
|
self.EmptyUndoBuffer()
|
|
1592
1592
|
self.SetSavePoint()
|
|
1593
|
-
|
|
1594
|
-
|
|
1593
|
+
self.filename = filename
|
|
1594
|
+
self.handler('buffer_loaded', self)
|
|
1595
1595
|
|
|
1596
1596
|
def _load_file(self, filename):
|
|
1597
1597
|
"""Wrapped method of LoadFile."""
|
|
1598
1598
|
if self.LoadFile(filename):
|
|
1599
|
-
self.filename = filename
|
|
1600
1599
|
self.EmptyUndoBuffer()
|
|
1601
1600
|
self.SetSavePoint()
|
|
1601
|
+
self.filename = filename
|
|
1602
1602
|
self.handler('buffer_loaded', self)
|
|
1603
1603
|
return True
|
|
1604
1604
|
return False
|
|
@@ -1606,8 +1606,8 @@ class Buffer(EditWindow, EditorInterface):
|
|
|
1606
1606
|
def _save_file(self, filename):
|
|
1607
1607
|
"""Wrapped method of SaveFile."""
|
|
1608
1608
|
if self.SaveFile(filename):
|
|
1609
|
-
self.filename = filename
|
|
1610
1609
|
self.SetSavePoint()
|
|
1610
|
+
self.filename = filename
|
|
1611
1611
|
self.handler('buffer_saved', self)
|
|
1612
1612
|
return True
|
|
1613
1613
|
return False
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
mwx/__init__.py,sha256=zLsXDgqyC5NsPCjRxjS2huvZ3uDyeOJ1vapotqe2ULM,834
|
|
2
2
|
mwx/bookshelf.py,sha256=UVVIwHaGO4aEHwZ8x5SKjpL-3MmQ1s6kkyuyRZqKWvU,5070
|
|
3
3
|
mwx/controls.py,sha256=prp1NhZqv1XANhi2PPxW9jtrgwj_02XMOOyyzZ48klM,47185
|
|
4
|
-
mwx/framework.py,sha256=
|
|
4
|
+
mwx/framework.py,sha256=9mvG3E0sx1gTuEcuz4RK4e3bhd4il_rduRrHkgJ9U4c,75109
|
|
5
5
|
mwx/graphman.py,sha256=9MG0BzQh5lDDadyPPXps2M0hf6mPN3G0MQbBGdplY_I,70027
|
|
6
6
|
mwx/images.py,sha256=mrnUYH12I3XLVSZcEXlpVltX0XMxufbl2yRvDIQJZqc,49957
|
|
7
7
|
mwx/matplot2.py,sha256=qaF_gvLoLn-TimLbRR59KUavNr1ZpZQdSMqjzJk47rk,32682
|
|
8
8
|
mwx/matplot2g.py,sha256=mDaD367wjq6xsyIDX9ot8jLwYYGayoavWMhqsQVBHac,65442
|
|
9
9
|
mwx/matplot2lg.py,sha256=tg8u7w4DxiJdPN-E197NOmbQpc_1gZkgDHYv_xUhbFA,27224
|
|
10
10
|
mwx/mgplt.py,sha256=ITzxA97yDwr_35BUk5OqnyskSuKVDbpf2AQCKY1jHTI,5671
|
|
11
|
-
mwx/nutshell.py,sha256=
|
|
11
|
+
mwx/nutshell.py,sha256=c7VYeOmDSr1WcIzAjAIVmjTXBJqtxKzAz6EhZ9YmnAw,135633
|
|
12
12
|
mwx/utilus.py,sha256=FTJhVFmx6TAE5rvZ_nfxZgyyaW4zMpXEz74v72X6m7Y,37399
|
|
13
13
|
mwx/wxmon.py,sha256=Qk86VbuuW2rR46pqEYLur13G_aloWz5SVv6sib30YY0,12717
|
|
14
14
|
mwx/wxpdb.py,sha256=2z3ZD9Oo1H-ONBHlaprkB9hrTmAI7o03sqO46ppEFE4,19129
|
|
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=T-2xSv_D2bk9fJ64aiSEe1rJRTeqaIpLVAYEUXW5vz8
|
|
|
21
21
|
mwx/plugins/line_profile.py,sha256=WJB5z7F53yg4dII2R36IFZvtkSOGWT669b1HmAAXSnQ,816
|
|
22
22
|
mwx/py/__init__.py,sha256=xykgfOytOwNuvXsfkLoumFZSTN-iBsHOjczYXngjmUE,12
|
|
23
23
|
mwx/py/filling.py,sha256=KaHooM32hrGGgqw75Cbt8lAvACwC6RXadob9LGgNnEc,16806
|
|
24
|
-
mwxlib-0.94.
|
|
25
|
-
mwxlib-0.94.
|
|
26
|
-
mwxlib-0.94.
|
|
27
|
-
mwxlib-0.94.
|
|
28
|
-
mwxlib-0.94.
|
|
24
|
+
mwxlib-0.94.7.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
|
|
25
|
+
mwxlib-0.94.7.dist-info/METADATA,sha256=_il1CbhksQkqZv4Gbmb_tr6DuQf8usLLIoGqXm1U6Ic,1925
|
|
26
|
+
mwxlib-0.94.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
27
|
+
mwxlib-0.94.7.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
|
|
28
|
+
mwxlib-0.94.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|