Edouard Choinière
95cafd1a3f
style: Normalise numpy imports with import numpy as np
...
The convention when importing numpy is to use `import numpy as np`
Fixes: unconventional-import-alias (ICN001)
Ruff rule: https://docs.astral.sh/ruff/rules/unconventional-import-alias/
2025-02-08 16:48:57 +00:00
Alexandre Detiste
66a9320917
finish removing six
2025-02-02 20:30:33 -05:00
Alexandre Detiste
0257f755cf
remove most of Python2 compatibility code
2025-02-02 20:17:45 -05:00
Scott Talbert
8908dd6c51
Merge pull request #2237 from bosonogi/webview-demo-with-fs-handler
...
ci-build / build-source-dist (push) Has been cancelled
ci-build / Build wxPython documentation (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, macos-13, 3.9) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, ubuntu-22.04, 3.9) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.10) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.11) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.12) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.13) (push) Has been cancelled
ci-build / build-wheels (x64, windows-2022, 3.9) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.10) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.11) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.12) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.13) (push) Has been cancelled
ci-build / build-wheels (x86, windows-2022, 3.9) (push) Has been cancelled
ci-build / Publish Python distribution to PyPI (push) Has been cancelled
ci-build / Create GitHub Release and upload source (push) Has been cancelled
ci-build / Upload wheels to snapshot-builds on wxpython.org (push) Has been cancelled
Include usage of `wxMemoryFSHandler` in webview demo
2024-11-14 20:33:47 -05:00
Randy Döring
f7d1d8188c
Fix NumPy 2.0 deprecations via running ruff ( #2580 )
...
* Fix NumPy 2.0 deprecations via running `ruff check --select NPY201 --fix --exclude docs/sphinx/rest_substitutions/snippets/python/converted`
See https://numpy.org/devdocs/numpy_2_0_migration_guide.html#numpy-2-0-migration-guide
* Use `numpy.any` instead of `any` because the latter does not work for multidimensional arrays.
2024-08-21 19:53:57 -04:00
DietmarSchwertberger
7e2c7d69c9
remove demo dependency on distutils; fixes issue 2519
2024-01-24 23:51:43 +01:00
David Foster
2117602aea
demo: ShortcutEditor: Fix broken call GetMenuBar()
2023-05-20 08:01:05 -04:00
Robin Dunn
4f5ee98256
Merge pull request #2279 from pchemguy/demo-AUI_DockingWindowMgr
...
Fixes method typo in AUI_DockingWindowMgr
2022-10-18 17:28:27 -07:00
Robin Dunn
fae30156df
Merge pull request #2276 from pchemguy/demo-treemixin-treelistctrl
...
Reenabled TreeListCtrl demo in TreeMixin
2022-10-18 17:26:29 -07:00
Robin Dunn
b978de2962
Merge pull request #2266 from pchemguy/demo-joystick.py
...
Added explicit "to int" type casting in dc.DrawXXX calls
2022-10-18 17:20:50 -07:00
Robin Dunn
6b7885b0c5
Merge pull request #2260 from pchemguy/demo-OwnerDrawnComboBox-fix
...
Missing required explicit float->int type casting
2022-10-18 17:18:20 -07:00
PChemGuy
8449df773f
Method typo in AUI_DockingWindowMgr
2022-09-11 11:08:28 +03:00
PChemGuy
a2f17dcea8
Reenabled TreeListCtrl demo in TreeMixin
...
Replaced a TreeListCtrl to wx.gizmos, and updated and uncommented the associated code (also changed AppendColumn to AddColumn).
Note, this code does not work as is with wx.dataview.TreeListCtrl.
2022-09-10 12:41:02 +03:00
PChemGuy
089a2c1245
Added explicit "to int" type casting in dc.DrawXXX calls
2022-09-04 16:08:44 +03:00
PChemGuy
3b2c4140cf
Missing required explicit float->int type casting
...
Fixes missing type casting in the OwnerDrawnComboBox.py demo module.
2022-09-04 11:07:47 +03:00
PChemGuy
5368d963f1
Missing required explicit float->int type casting
...
Fixes missing type casting in the OwnerDrawnComboBox.py demo module.
2022-09-04 08:01:24 +03:00
PChemGuy
83dba91a2b
Missing required explicit float->int type casting
...
"therange" variable, used to adjust range of the KnobCtrl, must be an integer.
2022-09-03 16:31:12 +03:00
Toni Ruža
fada0e87f3
Include usage of wxMemoryFSHandler in webview demo
2022-08-16 12:03:22 +02:00
Robin Dunn
0295297913
Use images on the Notebook tabs on Mac too, and clean up some other old hacks
2022-06-07 19:28:24 -07:00
Scott Talbert
58682ecaf4
Update demos to work wxWidgets 3.1.6
2022-05-02 22:36:44 -04:00
Robin Dunn
66ec80bd21
Merge branch 'master' into update-wx
2021-12-15 18:59:03 -08:00
Robin Dunn
a843ed14f2
Merge pull request #2014 from arjones6/master
...
Add wxDC.DrawLinesFromBuffer to draw directly from numpy array memory using the Buffer protocol
2021-12-15 18:55:41 -08:00
Robin Dunn
e53b09aea7
Revert "New button type: ShowHideToggleButton."
2021-12-15 18:10:12 -08:00
Robin Dunn
1432d933a5
Merge pull request #1980 from TEParsons/showHideToggleButton
...
New button type: ShowHideToggleButton.
2021-12-15 18:07:04 -08:00
arjones6
efbea6a275
dc.DrawLinesFromBuffer demo and test to intc data type. Updated documentation.
2021-12-15 11:07:18 -05:00
arjones6
232542ba3e
dc.DrawLinesFromBuffer test and demo added
2021-12-14 12:47:55 -05:00
Todd
2e753e6775
Add demo for show/hide toggle button
2021-12-14 15:33:39 +00:00
Robin Dunn
9627bb8035
Merge branch 'master' into update-wx
2021-12-13 21:40:18 -08:00
Robin Dunn
d9725119d7
Merge pull request #2039 from swt2c/pygauge_py3.10
...
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
2021-12-13 20:54:44 -08:00
Robin Dunn
272990b131
Merge pull request #1997 from cclauss/codespell
...
Fix typos discovered by codespell
2021-12-13 20:16:39 -08:00
Scott Talbert
173d079681
Fix a bunch of Python 3.10 issues with pure-Python classes and demos
...
In Python 3.10, a change[1] was implemented where extension functions
that take integer arguments will no longer silently accept non-integer
arguments (e.g., floats) that can only be converted to integers with a
loss of precision. This PR fixes most of these issues in the pure-Python
classes and demos by explicitly converting the parameters to int before
passing them to wxWidgets. There is loss of precision, but this was
happening before (automatically) anyway as most wxWidgets DeviceContext
functions operate using integers.
Additionally, the PR fixes a few sizing issues, mostly with SpinCtrls being
too small on GTK3.
This is an example of the relevant exception:
Traceback (most recent call last):
File "/usr/lib64/python3.10/site-packages/wx/lib/agw/pygauge.py", line 355, in OnPaint
r.width = w
TypeError: 'float' object cannot be interpreted as an integer
Fixes #2038 .
[1] https://bugs.python.org/issue37999
2021-12-01 14:19:00 -05:00
Scott Talbert
f42bea0927
Merge pull request #2005 from gwhitney/setscrollbar_types
...
fix: Correct types of arguments to ScrolledWindow.SetScrollbars
2021-11-29 21:20:30 -05:00
Robin Dunn
f95f3187ad
Merge branch 'master' into update-wx
2021-11-23 17:00:06 -08:00
Robin Dunn
1eef4d9390
Add InitLocale method
2021-10-26 12:35:04 -07:00
Glen Whitney
3eb9eb32dc
fix: Correct types of arguments to ScrolledWindow.SetScrollbars
2021-08-31 11:06:27 -07:00
Christian Clauss
25ba122168
Fix typos discovered by codespell
2021-08-07 18:55:49 +02:00
Robin Dunn
dcf5ba7888
Switch overview text to plain text
2021-07-24 15:17:33 -07:00
Mat Kelly
274a12ded0
Fix parameters for 'More Grid Features' constructor
2021-04-23 16:08:07 -04:00
Robin Dunn
442b50ad78
Ensure the the timers are all stopped when the Timer sample is shutdown
2021-01-20 13:35:31 -08:00
Robin Dunn
13cc5db688
I think this wx.Locale() may be unnecessary now that InitLocal has been rewritten...
2021-01-18 15:38:44 -08:00
cbeytas
7b02c88a28
Merge branch 'master' into treefixes
2021-01-10 03:04:29 +00:00
Robin Dunn
4ab028d7c3
Use a global wx.DataFormat
2021-01-07 14:52:34 -08:00
Robin Dunn
bb20ee8809
Fix sizer flags for joystick demo
2021-01-05 16:15:10 -08:00
Robin Dunn
12db41dad1
Ensure SIP knows about the item container pure virtuals.
2020-12-29 18:11:05 -08:00
Robin Dunn
3d1134708e
wxGridCellRenderer::Draw has an implementation despite being pure virtual
2020-12-29 14:59:17 -08:00
Michael Eager
566dd8f35f
Merge branch 'master' into refactor-thumbnailctrl
2020-11-16 15:32:52 -08:00
eagerm
846a4f4e4a
Remove unused sizer, add spacing to controls.
2020-11-16 12:31:00 -08:00
eagerm
4bef428bce
Add documentation to demo programs.
2020-11-16 12:07:45 -08:00
Robin Dunn
b27e492898
Also show wx.adv.DatePickerCtrlGeneric in the demo
2020-11-13 09:39:37 -08:00
eagerm
4c6b725479
Create ThumbDemoConfig.py from class in ScrolledThumbnail & ThumbnailCtrl
...
Add import statements to ScrolledThumbnail and ThumbnailCtrl.
Remove unneeded imports.
2020-11-12 09:40:00 -08:00