Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60383ac

Browse files
authored
DOC: fix broken link to wxPython Widget Inspection Tool (#31535)
* DOC: fix broken link to wxPython Widget Inspection Tool The wiki.wxpython.org URL returns 404. Point readers to the current official documentation at docs.wxpython.org instead. Refs #30306. * DOC: restructure wx5 example to use wx.App with InspectableApp tip Per review feedback, the regular example now uses wx.App() directly so readers see the standard wxPython entry point without any debug-only machinery. A .. tip:: directive in the module docstring describes wx.lib.mixins.inspection.InspectableApp as an optional debugging aid and links to the wx.lib.inspection documentation (which replaces the now-dead wiki URL). The wx.lib.mixins.inspection import is removed since it is no longer referenced from the example code. * DOC: apply review suggestion on wx5 example Rewrite the .. tip:: in the wx5 example with the wording proposed in review, and add a wx intersphinx mapping entry so the :class:`wx.App` and :class:`wx.lib.mixins.inspection.InspectableApp` cross-references resolve under nitpicky docs builds.
1 parent 07b40e6 commit 60383ac

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ def autodoc_process_bases(app, name, obj, options, bases):
275275
'python': ('https://docs.python.org/3/', None),
276276
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
277277
'tornado': ('https://www.tornadoweb.org/en/stable/', None),
278+
'wx': ('https://docs.wxpython.org/', None),
278279
'xarray': ('https://docs.xarray.dev/en/stable/', None),
279280
'meson-python': ('https://mesonbuild.com/meson-python/', None),
280281
'pip': ('https://pip.pypa.io/en/stable/', None),

galleries/examples/user_interfaces/embedding_in_wx5_sgskip.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,17 @@
33
Embed in wx #5
44
==============
55
6+
.. tip::
7+
8+
As a development and debugging aid, you can replace :class:`wx.App`
9+
by :class:`wx.lib.mixins.inspection.InspectableApp`.
10+
This adds the capability to start the `Widget Inspection Tool
11+
<https://wiki.wxpython.org/How%20to%20use%20Widget%20Inspection%20Tool%20-%20WIT%20%28Phoenix%29>`_
12+
via :kbd:`Ctrl-Alt-I`.
613
"""
714

815
import wx
916
import wx.lib.agw.aui as aui
10-
import wx.lib.mixins.inspection as wit
1117

1218
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
1319
from matplotlib.backends.backend_wxagg import \
@@ -44,11 +50,7 @@ def add(self, name="plot"):
4450

4551

4652
def demo():
47-
# Alternatively you could use:
48-
# app = wx.App()
49-
# InspectableApp is a great debug tool, see:
50-
# http://wiki.wxpython.org/Widget%20Inspection%20Tool
51-
app = wit.InspectableApp()
53+
app = wx.App()
5254
frame = wx.Frame(None, -1, 'Plotter')
5355
plotter = PlotNotebook(frame)
5456
axes1 = plotter.add('figure 1').add_subplot()

0 commit comments

Comments
 (0)