mwxlib 0.95.2__py3-none-any.whl → 0.95.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/__init__.py CHANGED
@@ -13,7 +13,7 @@ from .controls import Button, ToggleButton, TextCtrl, Choice, Gauge, Indicator
13
13
 
14
14
  ## Plugman
15
15
  ## from . import graphman
16
- ## from .graphman import Frame as GraphFrame, Layer, Thread, Graph
16
+ ## from .graphman import Frame as ViewFrame, Layer, Thread, Graph
17
17
 
18
18
  ## Matplot
19
19
  ## from .matplot2 import MatplotPanel
mwx/framework.py CHANGED
@@ -1,7 +1,7 @@
1
1
  #! python3
2
2
  """mwxlib framework.
3
3
  """
4
- __version__ = "0.95.2"
4
+ __version__ = "0.95.3"
5
5
  __author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
6
6
 
7
7
  from functools import wraps, partial
mwx/nutshell.py CHANGED
@@ -1082,9 +1082,6 @@ class EditorInterface(CtrlInterface):
1082
1082
  """Goto char position with selection."""
1083
1083
  if pos is None or pos < 0:
1084
1084
  return
1085
- ## if pos < 0:
1086
- ## pos += self.TextLength + 1 # Counts end-of-buffer (+1:\0)
1087
- ## return
1088
1085
  org = self.cpos
1089
1086
  if org == pos:
1090
1087
  return
@@ -1095,7 +1092,7 @@ class EditorInterface(CtrlInterface):
1095
1092
 
1096
1093
  if interactive:
1097
1094
  ## Update the caret position/status manually.
1098
- ## To update caret status, shake L/R w/o modifier #TODO: better idea?
1095
+ ## To update caret status, shake L/R w/o modifier
1099
1096
  ## Don't do this if selection is active.
1100
1097
  vk = wx.UIActionSimulator()
1101
1098
  modkeys = [k for k in (wx.WXK_CONTROL, wx.WXK_ALT, wx.WXK_SHIFT)
@@ -1296,7 +1293,7 @@ class EditorInterface(CtrlInterface):
1296
1293
  @can_edit
1297
1294
  def kill_line(self):
1298
1295
  p = self.eol
1299
- if p == self.cpos:
1296
+ if p == self.cpos: # caret at end of line
1300
1297
  if self.get_char(p) == '\r': p += 1
1301
1298
  if self.get_char(p) == '\n': p += 1
1302
1299
  self.Replace(self.cpos, p, '')
@@ -1304,11 +1301,7 @@ class EditorInterface(CtrlInterface):
1304
1301
  @can_edit
1305
1302
  def backward_kill_line(self):
1306
1303
  p = self.bol
1307
- text, lp = self.CurLine
1308
- if text[:lp] == sys.ps2: # caret at the prompt head
1309
- p -= len(sys.ps2)
1310
- lp -= len(sys.ps2)
1311
- if text[:lp] == '' and p: # caret at the beginning of the line
1304
+ if p == self.cpos > 0: # caret at beginning of line
1312
1305
  if self.get_char(p-1) == '\n': p -= 1
1313
1306
  if self.get_char(p-1) == '\r': p -= 1
1314
1307
  self.Replace(p, self.cpos, '')
@@ -2440,6 +2433,8 @@ class Nautilus(Shell, EditorInterface):
2440
2433
  'escape pressed' : (-1, self.on_enter_escmap),
2441
2434
  'space pressed' : (0, self.OnSpace),
2442
2435
  '*backspace pressed' : (0, self.OnBackspace),
2436
+ 'C-backspace pressed' : (0, _F(self.backward_kill_word)),
2437
+ 'S-backspace pressed' : (0, _F(self.backward_kill_line)),
2443
2438
  'enter pressed' : (0, self.OnEnter),
2444
2439
  'C-enter pressed' : (0, _F(self.insertLineBreak)),
2445
2440
  'C-S-enter pressed' : (0, _F(self.insertLineBreak)),
@@ -2692,6 +2687,30 @@ class Nautilus(Shell, EditorInterface):
2692
2687
  return
2693
2688
  evt.Skip()
2694
2689
 
2690
+ @can_edit
2691
+ def backward_kill_line(self):
2692
+ p = max(self.bol, self.bolc) # for debugger mode: bol <= bolc
2693
+ text, lp = self.CurLine
2694
+ if text[:lp] == sys.ps2:
2695
+ self.Replace(p - lp, p, '') # eats ps2:prompt
2696
+ return
2697
+ if p == self.cpos > 0: # caret at beginning of line
2698
+ if self.get_char(p-1) == '\n': p -= 1
2699
+ if self.get_char(p-1) == '\r': p -= 1
2700
+ self.Replace(p, self.cpos, '')
2701
+
2702
+ @can_edit
2703
+ def backward_kill_word(self):
2704
+ p = self.cpos
2705
+ text, lp = self.CurLine
2706
+ if text[:lp] == sys.ps2:
2707
+ self.goto_char(p - lp) # skips ps2:prompt
2708
+ self.WordLeft()
2709
+ q = max(self.bol, self.bolc) # for debugger mode: bol <= bolc
2710
+ if self.cpos < q:
2711
+ self.goto_char(q) # Don't skip back prompt
2712
+ self.Replace(self.cpos, p, '')
2713
+
2695
2714
  def OnEnter(self, evt):
2696
2715
  """Called when enter pressed."""
2697
2716
  if not self.CanEdit():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mwxlib
3
- Version: 0.95.2
3
+ Version: 0.95.3
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
- mwx/__init__.py,sha256=TbTijMLO3dsX4wargOd3z-z5wjMK8fcogBBr_mgCnSs,815
1
+ mwx/__init__.py,sha256=SNSLQc0IGuE6LDT5mzaAxXRgcH_k6cRVS3gXzFQqdZM,814
2
2
  mwx/bookshelf.py,sha256=DAhMQk3_J4rdE50adBMFu5wNz3WdMh_zzJ37O9ncceo,5103
3
3
  mwx/controls.py,sha256=JBMUbDgHFf4Dx0PofCdnoQExBnGjxiAeSGkdS_0Qgo4,47673
4
- mwx/framework.py,sha256=dVj9vz-jGDsVUDa3H4urXRWwe6v6I2unrc7fx6rQEJg,75531
4
+ mwx/framework.py,sha256=t-d8fgYP_fJ9vTxJ9ZZ7POWK7RNds_-q-iGhEI6IVHU,75531
5
5
  mwx/graphman.py,sha256=PacQF1Of6oaqw26uFoXaAK9IrwggGRwoJe9uCP5JZ28,70373
6
6
  mwx/images.py,sha256=mrnUYH12I3XLVSZcEXlpVltX0XMxufbl2yRvDIQJZqc,49957
7
7
  mwx/matplot2.py,sha256=nA7RLW1tf5kQfrenFnrAF900DbrpOUldc3SGaJgJKi0,32794
8
8
  mwx/matplot2g.py,sha256=faKpuBdp4H_g-HKfRdxV17AwHtXcfRi2F0myE3cjM04,65393
9
9
  mwx/matplot2lg.py,sha256=gI_L_GofQrg5TIgZFMgYu8-7IRoe6VCRG3Ub35ChSpQ,27177
10
10
  mwx/mgplt.py,sha256=ITzxA97yDwr_35BUk5OqnyskSuKVDbpf2AQCKY1jHTI,5671
11
- mwx/nutshell.py,sha256=DS_Q63RmOpINAmkZkDCYzVS35iGZNSv254gLrSUm9yo,135846
11
+ mwx/nutshell.py,sha256=mGWw2biIKyunTMyrRbLHNdmFLpxVCIP5UTsaeS2m4gw,136594
12
12
  mwx/utilus.py,sha256=Uwj6vbNUUztwOswPG75xtsT2y_PZqh3QiJraxmA9iT0,37401
13
13
  mwx/wxmon.py,sha256=6es-jVz9Ht7vZnG7VBJcaNYLHY0PnZtij60SXcZRTeY,12727
14
14
  mwx/wxpdb.py,sha256=lLowkkAgMhPFHAfklD7wZHq0qbSMjRxnBFtSajmVgME,19133
@@ -21,8 +21,8 @@ mwx/plugins/frame_listview.py,sha256=fY27r_8ttf2hi-T0CPgY_LGbH9xKkQmSIqgaALMyVCM
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=KaHooM32hrGGgqw75Cbt8lAvACwC6RXadob9LGgNnEc,16806
24
- mwxlib-0.95.2.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
- mwxlib-0.95.2.dist-info/METADATA,sha256=MlRm2EglFJRORLtyTPSH85NX07m1oL2TY3JtPoHqQ10,1925
26
- mwxlib-0.95.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
27
- mwxlib-0.95.2.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-0.95.2.dist-info/RECORD,,
24
+ mwxlib-0.95.3.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
+ mwxlib-0.95.3.dist-info/METADATA,sha256=zRgIwaO-S04HK4GufhqvHET5KYJTKeyIfct8i36pHXw,1925
26
+ mwxlib-0.95.3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
27
+ mwxlib-0.95.3.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-0.95.3.dist-info/RECORD,,