From d343f222ccd77a618c12f676653cbc43063592c8 Mon Sep 17 00:00:00 2001 From: DietmarSchwertberger Date: Tue, 27 Feb 2024 14:08:10 +0100 Subject: [PATCH] update BusyCursor snippet --- .../snippets/python/converted/wx.BusyCursor.1.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/sphinx/rest_substitutions/snippets/python/converted/wx.BusyCursor.1.py b/docs/sphinx/rest_substitutions/snippets/python/converted/wx.BusyCursor.1.py index 181f59d2..0254dbcd 100644 --- a/docs/sphinx/rest_substitutions/snippets/python/converted/wx.BusyCursor.1.py +++ b/docs/sphinx/rest_substitutions/snippets/python/converted/wx.BusyCursor.1.py @@ -1,7 +1,11 @@ + # Normal usage wait = wx.BusyCursor() - - for i in xrange(10000): + for i in range(10000): DoACalculation() - del wait + + # It can be used as a context manager too + with wx.BusyCursor(): + for i in range(10000): + DoACalculation()