mwxlib 0.98.0__py3-none-any.whl → 0.98.1__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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #! python3
2
2
  """mwxlib framework.
3
3
  """
4
- __version__ = "0.98.0"
4
+ __version__ = "0.98.1"
5
5
  __author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
6
6
 
7
7
  from contextlib import contextmanager
mwx/nutshell.py CHANGED
@@ -72,14 +72,22 @@ def ask(f, prompt="Enter value", type=str):
72
72
 
73
73
 
74
74
  class AutoCompInterfaceMixin:
75
- """Auto completion interface.
75
+ """Auto-complete mode interface.
76
+
77
+ Mode name Mode vars.
78
+ --------------------------------
79
+ [1] history-comp history (an instance variable of the Shell)
80
+ [2] word-comp -
81
+ [3] apropos-comp -
82
+ [4] text-comp fragmwords
83
+ [5] module-comp modules
76
84
 
77
85
  Note:
78
86
  This class is mixed-in ``wx.py.editwindow.EditWindow``.
79
87
  """
80
- modules = set() # to be used in module-comp mode
81
-
82
- fragmwords = set(keyword.kwlist + dir(builtins)) # to be used in text-comp mode
88
+ history = [] # used in history-comp mode
89
+ modules = set() # used in module-comp mode
90
+ fragmwords = set(keyword.kwlist + dir(builtins)) # used in text-comp mode
83
91
 
84
92
  def __init__(self):
85
93
  ## cf. sys.modules
@@ -94,10 +102,9 @@ class AutoCompInterfaceMixin:
94
102
  (override) Snip the tip of max N lines if it is too long.
95
103
  Keep the tip for calltip-click event.
96
104
  """
97
- self._calltip_pos = pos
98
- self._calltip = tip
105
+ self._calltips = (pos, tip)
99
106
  lines = tip.splitlines()
100
- if len(lines) > N > 0:
107
+ if N and len(lines) > N > 0:
101
108
  lines[N+1:] = ["\n...(snip) This tips are too long... "
102
109
  "Click to show more details."]
103
110
  tip = '\n'.join(lines)
@@ -1836,7 +1843,6 @@ class Buffer(AutoCompInterfaceMixin, EditorInterface, EditWindow):
1836
1843
  '. pressed' : (2, skip),
1837
1844
  'M-. pressed' : (2, self.call_word_autocomp),
1838
1845
  'M-/ pressed' : (3, self.call_apropos_autocomp),
1839
- 'M-m pressed' : (5, self.call_module_autocomp),
1840
1846
  },
1841
1847
  2 : { # word auto completion AS-mode
1842
1848
  'quit' : (0, clear_autocomp),
@@ -1892,34 +1898,6 @@ class Buffer(AutoCompInterfaceMixin, EditorInterface, EditWindow):
1892
1898
  '*[LR]win pressed' : (3, ),
1893
1899
  '*f[0-9]* pressed' : (3, ),
1894
1900
  },
1895
- 5 : { # module auto completion AS-mode
1896
- 'quit' : (0, clear_autocomp),
1897
- '* pressed' : (0, clear_autocomp, fork),
1898
- 'tab pressed' : (0, clear, skip),
1899
- 'enter pressed' : (0, clear, skip),
1900
- 'escape pressed' : (0, clear_autocomp),
1901
- 'up pressed' : (5, skip, self.on_completion_backward),
1902
- 'down pressed' : (5, skip, self.on_completion_forward),
1903
- '*left pressed' : (5, skip),
1904
- '*left released' : (5, self.call_module_autocomp),
1905
- '*right pressed' : (5, skip),
1906
- '*right released' : (5, self.call_module_autocomp),
1907
- '[a-z0-9_.,] pressed' : (5, skip),
1908
- '[a-z0-9_.,] released' : (5, self.call_module_autocomp),
1909
- 'S-[a-z\\] pressed' : (5, skip),
1910
- 'S-[a-z\\] released' : (5, self.call_module_autocomp),
1911
- '\\ released' : (5, self.call_module_autocomp),
1912
- 'M-m pressed' : (5, _F(self.call_module_autocomp, force=1)),
1913
- '*delete pressed' : (5, skip),
1914
- '*backspace pressed' : (5, skip),
1915
- '*backspace released' : (5, self.call_module_autocomp),
1916
- 'C-S-backspace pressed' : (5, ),
1917
- '*alt pressed' : (5, ),
1918
- '*ctrl pressed' : (5, ),
1919
- '*shift pressed' : (5, ),
1920
- '*[LR]win pressed' : (5, ),
1921
- '*f[0-9]* pressed' : (5, ),
1922
- },
1923
1901
  })
1924
1902
 
1925
1903
  self.show_folder()
@@ -1944,7 +1922,7 @@ class Buffer(AutoCompInterfaceMixin, EditorInterface, EditWindow):
1944
1922
  def OnCallTipClick(self, evt):
1945
1923
  if self.CallTipActive():
1946
1924
  self.CallTipCancel()
1947
- self.CallTipShow(self._calltip_pos, self._calltip, N=-1)
1925
+ self.CallTipShow(*self._calltips, N=None)
1948
1926
  evt.Skip()
1949
1927
 
1950
1928
  def OnIndicatorClick(self, evt):
@@ -2642,24 +2620,24 @@ class Nautilus(AutoCompInterfaceMixin, EditorInterface, Shell):
2642
2620
  ``*`` denotes the original syntax defined in wx.py.shell,
2643
2621
  for which, at present version, enabled with USE_MAGIC switch being on.
2644
2622
 
2645
- Autocomp-key bindings::
2623
+ Auto-complete key bindings::
2646
2624
 
2647
2625
  C-up : [0] retrieve previous history
2648
2626
  C-down : [0] retrieve next history
2649
- C-j(J), M-j : [0] call tooltip of eval (for the word selected or focused)
2650
- C-h(H), M-h : [0] call tooltip of help (for the func selected or focused)
2651
- TAB : [1] history-comp-mode
2652
- M-p : [1] retrieve previous history in comp-mode
2653
- M-n : [1] retrieve next history in comp-mode
2654
- M-. : [2] word-comp-mode
2655
- M-/ : [3] apropos-comp-mode
2656
- M-, : [4] text-comp-mode
2657
- M-m : [5] module-comp-mode
2627
+ C-j, M-j : [0] call tooltip of eval (for the word selected or focused)
2628
+ C-h, M-h : [0] call tooltip of help (for the func selected or focused)
2629
+ TAB : [1] history-comp
2630
+ M-p : [1] retrieve previous history in history-comp mode
2631
+ M-n : [1] retrieve next history in history-comp mode
2632
+ M-. : [2] word-comp
2633
+ M-/ : [3] apropos-comp
2634
+ M-, : [4] text-comp
2635
+ M-m : [5] module-comp
2658
2636
 
2659
2637
  Autocomps are incremental when pressed any alnums,
2660
2638
  and decremental when backspace.
2661
2639
 
2662
- Enter-key bindings::
2640
+ Enter key bindings::
2663
2641
 
2664
2642
  C-enter : insert-line-break
2665
2643
  M-enter : duplicate-command
@@ -3070,7 +3048,7 @@ class Nautilus(AutoCompInterfaceMixin, EditorInterface, Shell):
3070
3048
  def OnCallTipClick(self, evt):
3071
3049
  if self.CallTipActive():
3072
3050
  self.CallTipCancel()
3073
- self.parent.handler('add_help', self._calltip)
3051
+ self.parent.handler('add_help', self._calltips[1])
3074
3052
  evt.Skip()
3075
3053
 
3076
3054
  def OnDrag(self, evt): #<wx._core.StyledTextEvent>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mwxlib
3
- Version: 0.98.0
3
+ Version: 0.98.1
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
@@ -1,14 +1,14 @@
1
1
  mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
2
2
  mwx/bookshelf.py,sha256=Y4xI2SrEO22DrI1hyyfFx7DfFZA8znOzX9RWMPsA2BE,5137
3
3
  mwx/controls.py,sha256=K4GJB81TXv5q0faTELQgbUmtMQBRIM9yINJdTI0xA3g,47556
4
- mwx/framework.py,sha256=kKG4rcBiq-PD5v1sHLtI1XRTve0wugG6JwwNbMv5Pa8,75509
4
+ mwx/framework.py,sha256=xSh2cxTyg6SHU3jh9cGTaiC2u7teJPJwRuFrmEfSXiQ,75509
5
5
  mwx/graphman.py,sha256=Cyhl_Da_HGBfk721gu1r5iwSH9L3yPEG8Fzmc2gx-EU,70462
6
6
  mwx/images.py,sha256=_-Eh3xF7Khu42ivkYp97NXIzSNGbjcidqtWjZQFGtqE,47827
7
7
  mwx/matplot2.py,sha256=xCJ_ZzdDEWmzctpPaOrzTnwXyHINP4nfFHweoTZa6ug,32899
8
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=iVJGFh45ZtXs_g8LGi1UNI6H-3jI2pDkYNc2eF3T-7k,142853
11
+ mwx/nutshell.py,sha256=nTEKmJ0CMqkVtbmIlDHvZDpkUjefgL6QbxMZKwbZpIk,141553
12
12
  mwx/utilus.py,sha256=mmqB4P_3mTi7SrFleMiN1599Jm0Us0XKnNA6v2xglSs,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.98.0.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
- mwxlib-0.98.0.dist-info/METADATA,sha256=qAaHXqyArN_ZNCNoeukt6YxYGPQ-n8h9JIgfAcKuBnU,1880
26
- mwxlib-0.98.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
27
- mwxlib-0.98.0.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-0.98.0.dist-info/RECORD,,
24
+ mwxlib-0.98.1.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
+ mwxlib-0.98.1.dist-info/METADATA,sha256=XcUcwip9zlP_OGddgjt4s8fHdRvz7pGU-y1NS1t4kXg,1880
26
+ mwxlib-0.98.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
27
+ mwxlib-0.98.1.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-0.98.1.dist-info/RECORD,,