Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.12.7 instead.

mwxlib

Welcome to mwxlib project! Python package based on matplotlib/wx and wxPython shell extension library

See Demo Script and Gallery.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Python 2.7 (PY2 support has ended since 0.50)
  • Python 3.5 (PY35 support has ended since 0.70)
  • Python 3.7 (PY37 support has ended since 0.80)
  • Python 3.8 -- 3.9 (Deprecated since 0.90)
  • Python 3.10 -- 3.12
    • wxpython >= 4.2.2 (recommended)
    • numpy
    • pillow
    • matplotlib
    • opencv-python
  • Python 3.13

Installing

To install, type:

pip install mwxlib

To install latest version from GitHub, type:

pip install git+https://github.com/komoto48g/mwxlib.git

How to use

mwx.deb is wx.py.shell-base inspector used for debugging in the target process.

>>> import mwx; mwx.deb()

📝 mwxlib creates "~/.mwxlib/" in your HOME directory. This includes history, logs, dump files used to check when an error occurs.

📝 At the first startup, it takes some time to collect module information and create a dictionary file. The collected module name is used for completion at the time of input in the shell. (If you start the shell while pressing [C-S-], the dictionary file will be recreated)

As you are diving into the python process, you can watch, inspect, and debug the target.

Enjoy diving!

Uninstalling

pip uninstall mwxlib

Features

intro The animation shows how the Nautilus works, which is embedded in a simple PyEditor app.

As you are diving into the python process, you can watch, inspect, and change everything in the target.

Nautilus in the Shell

The framework has an extended class based on wx.py.shell.Shell named Nautilus, which has the following features:

  1. Auto-completion and apropos functions are reinforced.
    • [1] history-comp-mode
    • [2] word-comp-mode
    • [3] apropos-comp-mode
    • [4] text-comp-mode
    • [5] module-comp-mode
  2. Magic syntax.
    • [ ` ] quoteback
    • [@] pullback
  3. Powerful inspectoin utilities.
    • Filling
    • InspectionTool
    • Ghost in the shell

All objects in the process can be accessed using:

    self : the target of the shell,
    this : the module which includes target.

To include the shell in your wxPython application:

>>> self.inspector = mwx.ShellFrame(self, target=self)

Autocomp key bindings

    C-up : [0] retrieve previous history
  C-down : [0] retrieve next history
C-j, M-j : [0] tooltip of eval (for the selected or focused word)
C-h, M-h : [0] calltip of help (for the selected or focused func)
     TAB : [1] history-comp-mode
     M-p : [1] retrieve previous history in comp-mode
     M-n : [1] retrieve next history in comp-mode
     M-. : [2] word-comp-mode
     M-/ : [3] apropos-comp-mode
     M-, : [4] text-comp-mode
     M-m : [5] module-comp-mode
  • All completions [1--5] are incremental when pressed any alnums, and decremental when backspace.
    See key bindings for more information.

Magic syntax

  • quoteback : x`y --> y=x | x`y`z --> z=y=x

  • pullback : x@y --> y(x) | x@y@z --> z(y(x))

  • apropos : x.y? [not] p => shows apropos &optional (not-)matched by p:predicates equiv. apropos(y, x [,ignorecase ?:True,??:False] [,pred=p]) y can contain regular expressions. (RE) \a:[a-z], \A:[A-Z] can be used in addition. p can be ?atom, ?callable, ?instance(*types), and predicates imported from inspect e.g., isclass, ismodule, ismethod, isfunction, etc.

  • info : ?x --> info(x) shows short information

  • help : ??x --> help(x) shows full description

  • sx : !x --> sx(x) executes command in external shell

    Note: The last three (*) are original syntax defined in wx.py.shell, at present version, enabled with USE_MAGIC switch being on

built-in utilities

@p          : Synonym of print.
@pp         : Synonym of pprint.
@mro        : Display mro list and filename:lineno.
@where      : Display filename:lineno.
@info       : Short info.
@help       : Full description.
@load       : Load a file in Log.
@dive       : Clone the shell with new target.
@debug      : Open pdb debugger or event monitor.
@watch      : Watch for events using event monitor.
@timeit     : Measure CPU time (per one execution).
@profile    : Profile a single function call.
@highlight  : Highlight the widget.
@filling    : Inspection using ``wx.lib.filling.Filling``.

Ghost in the shell

Ghost in the shell is the help system for divers, which is a notebook-style window consists of four editors:

  • scratch buffer
    • a temporary buffer
  • Help buffer
    • piping text from info(?) and help(??)
  • Logging buffer
    • logging debug process and the input-history

Authors

  • Kazuya O'moto - Initial work -

See also the list of who participated in this project.

Attribution

Default icons are provided by wx.ArtProvider. Optional icons are provided by:

Note: Other icons could be attributed to other open sources. This is a mish-mash of stuff from all over the internet. If I missed an author credit or attribution, please let me know.

License

This project is licensed under the MIT License - see the LICENSE file for details

Metadata

Release files for mwxlib 1.12.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mwxlib 1.12.5
File Interpreter ABI Platform
mwxlib-1.12.5-py3-none-any.whl Python 3 none any Details

Release files / mwxlib-1.12.5-py3-none-any.whl

Download URL mwxlib-1.12.5-py3-none-any.whl
Size 182.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ed132e40d3b86cb69abe8e6a7102c1eb31d83f04db09d388de83521b9775cbb
BLAKE2b-256 checksum
How to use checksums
348b5dfdb48ce00abff8bd09289346ec8b6a9769ef2b9052e4aa9d514f26b27d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for mwxlib 1.12.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.12.5 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page