mwxlib 0.97.6__py3-none-any.whl → 0.97.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/controls.py CHANGED
@@ -8,7 +8,6 @@ import wx.lib.scrolledpanel as scrolled
8
8
 
9
9
  from . import images
10
10
  from .utilus import SSM
11
- from .utilus import warn
12
11
  from .utilus import funcall as _F
13
12
  from .framework import pack, Menu
14
13
 
mwx/framework.py CHANGED
@@ -1,7 +1,7 @@
1
1
  #! python3
2
2
  """mwxlib framework.
3
3
  """
4
- __version__ = "0.97.6"
4
+ __version__ = "0.97.7"
5
5
  __author__ = "Kazuya O'moto <komoto@jeol.co.jp>"
6
6
 
7
7
  from contextlib import contextmanager
@@ -506,15 +506,19 @@ def pack(self, items, orient=wx.HORIZONTAL, style=None, label=None):
506
506
  ALIGN_CENTER_VERTICAL, ALIGN_CENTER_HORIZONTAL
507
507
  """
508
508
  if style is None:
509
- style = (0, wx.EXPAND | wx.ALL, 0)
510
- if label is not None:
509
+ style = (0, wx.EXPAND | wx.ALL, 0) # DEFALT_STYLE (prop, flag, border)
510
+ if label is None:
511
+ sizer = wx.BoxSizer(orient)
512
+ else:
511
513
  box = wx.StaticBox(self, -1, label)
512
514
  sizer = wx.StaticBoxSizer(box, orient)
513
- else:
514
- sizer = wx.BoxSizer(orient)
515
515
  for item in items:
516
+ if not isinstance(item, (wx.Object, list, tuple, type(None))):
517
+ warn(f"pack items must be a wx.Object, tuple or None, not {type(item)}")
516
518
  if item is None:
517
- item = ((0, 0), 0, 0, 0) # null space
519
+ item = (0, 0), 0, 0, 0 # null space
520
+ elif not item:
521
+ item = (0, 0) # padding space
518
522
  try:
519
523
  try:
520
524
  sizer.Add(item, *style)
@@ -522,8 +526,7 @@ def pack(self, items, orient=wx.HORIZONTAL, style=None, label=None):
522
526
  sizer.Add(*item) # using item-specific style
523
527
  except TypeError as e:
524
528
  traceback.print_exc()
525
- bmp = wx.StaticBitmap(self,
526
- bitmap=wx.ArtProvider.GetBitmap(wx.ART_ERROR))
529
+ bmp = wx.StaticBitmap(self, bitmap=wx.ArtProvider.GetBitmap(wx.ART_ERROR))
527
530
  bmp.SetToolTip(str(e))
528
531
  sizer.Add(bmp, 0, wx.EXPAND | wx.ALL, 0)
529
532
  wx.Bell()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mwxlib
3
- Version: 0.97.6
3
+ Version: 0.97.7
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,7 +1,7 @@
1
1
  mwx/__init__.py,sha256=nN62CGTWjME7Zz2h-jIRB8MxwuErIkHPGrlBzydkF0o,643
2
2
  mwx/bookshelf.py,sha256=Y4xI2SrEO22DrI1hyyfFx7DfFZA8znOzX9RWMPsA2BE,5137
3
- mwx/controls.py,sha256=LAPGoi_bpiGu6eGhPVHBzv2hx162kWxYBmzlZouMOdk,47582
4
- mwx/framework.py,sha256=r9nbxrRta0lQat7wWzgBOlHkNay9TYSHHikm1gDRhuk,75209
3
+ mwx/controls.py,sha256=K4GJB81TXv5q0faTELQgbUmtMQBRIM9yINJdTI0xA3g,47556
4
+ mwx/framework.py,sha256=muvp-MrmS8TGwpRx7S18X2u-nhS9YumUHA1K_MRKCwA,75443
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
@@ -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.6.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
- mwxlib-0.97.6.dist-info/METADATA,sha256=j9v4RwJ93aqB5yYTBlE1i0oENtFExZ5GTIoi_rFIo7E,1880
26
- mwxlib-0.97.6.dist-info/WHEEL,sha256=Rp8gFpivVLXx-k3U95ozHnQw8yDcPxmhOpn_Gx8d5nc,91
27
- mwxlib-0.97.6.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
- mwxlib-0.97.6.dist-info/RECORD,,
24
+ mwxlib-0.97.7.dist-info/LICENSE,sha256=PGtRKCaTkmUDlBQwpptJAxJtdqxIUtAmdBsaT9nUVkA,1091
25
+ mwxlib-0.97.7.dist-info/METADATA,sha256=ITXJ8FrL_C8Zp4tjs-dwINs4TrpykIZxNe-hot0NIP0,1880
26
+ mwxlib-0.97.7.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
27
+ mwxlib-0.97.7.dist-info/top_level.txt,sha256=SI1Mh118AstnUFGPNq5aMNKiAnVNmZk1S9Ij-OwAEpY,4
28
+ mwxlib-0.97.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.0.0)
2
+ Generator: setuptools (71.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5