Christian Clauss
25ba122168
Fix typos discovered by codespell
2021-08-07 18:55:49 +02:00
Robin Dunn
732ff6752b
Revert "Spelling fixes in wx.lib"
...
This reverts commit c00b8950da .
The spelling changes were a bit too aggressive.
2020-08-31 13:01:31 -07:00
Robin Dunn
c00b8950da
Spelling fixes in wx.lib
2020-07-14 12:53:31 -07:00
Metallicow
6e681835a6
Remove exception in py shell wrap() method
...
This exists in Scintilla when wxPython 4.0 Phoenix came out, so remove it as cruft.
2020-06-09 22:14:18 -05:00
efahl
2c571edc23
Eliminate deprecation warning
...
Remove import of 'imp' module to eliminate deprecation warning.
2020-05-14 12:00:56 -07:00
Per A. Brodtkorb
426258b7b7
Adding missing close for open and replaced "fid=open(filename) fid.close()"
...
statements with the safer "with open(filename) as fid:" blocks.
Also removed unnecessary "try: ... finally: pass" statements
and refactored code from img2py function into _write_image and _replace_non_alphanumeric_with_underscore
Fixes #1574
2020-03-25 10:36:38 +01:00
Robin Dunn
7a05d20d82
Merge pull request #1572 from pbrod/Fix_issue1571
...
Fixes issue 1571:
2020-03-23 16:07:22 -07:00
Robin Dunn
41c5af9cde
Merge pull request #1569 from pbrod/Fix_issue1554
...
Fixes issue # 1554:
2020-03-23 15:35:41 -07:00
Per A. Brodtkorb
e4e8bf8317
Fixes issue 1571:
...
Adding missing close for open.
If the "close()" call is missing after a "open(filename)" call, the filename isn't guaranteed to be closed before the interpreter exits.
This is generally a bad practice as explained here: https://stackoverflow.com/questions/7395542/is-explicitly-closing-files-important
Also replaced "fid=open(filename) fid.close()" statements for files with the safer
"with open(filename) as fid:" blocks. See https://www.python.org/dev/peps/pep-0343/
2020-03-23 17:16:44 +01:00
Per A. Brodtkorb
fc1823315b
Fixes issue # 1554:
...
Replaced "== None" and "!= None" with "is None" and "is not None", respectively, because the former is slower and error-prone.
2020-03-23 11:53:36 +01:00
Robin Dunn
8e2627e8e3
Merge pull request #1564 from pbrod/Fix_issue1556
...
Fixes issue #1556
2020-03-20 15:19:40 -07:00
Per A. Brodtkorb
033c18fd9f
Fixes issue #1556
...
Replaced XXX.keys() calls with idiomatic python 3 calls that are compatible with python 2 such as eg:
* replaced "y = xxx.keys()" or "y = list(xxx.keys())" with just "y = list(xxx)"
* replaced "sorted(xxx.keys())" or "sorted(list(xxx.keys()))" with just "sorted(xxx)"
* replaced "if not A in B.keys():" with "if A not in B:"
* replaced "for A in B.keys():" with "for A in B:"
See also https://python-future.org/compatible_idioms.html
https://python-future.org/compatible_idioms.html#dict-keys-values-items-as-a-list
2020-03-20 18:51:19 +01:00
Per A. Brodtkorb
05ac589e2d
Fixes issue 1555
...
Replace open-close statements by the use of "with"-blocks.
With the "With" statement, you get better syntax and exceptions handling.
"The with statement simplifies exception handling by encapsulating common
preparation and cleanup tasks."
In addition, it will automatically close the file. The with statement provides
a way for ensuring that a clean-up is always used.
2020-03-20 15:03:09 +01:00
Robin Dunn
6206d20bad
Various small tweaks and fixes
2019-09-11 12:56:11 -07:00
Paul Kienzle
37a575c1fb
python 2/3 compatible file handling. Refs #1193 .
2019-04-13 02:19:52 -04:00
jensgoe
714a9a222d
ignore newline added by Tokenize module since Python 3.6 ( fixes #1109 )
2018-12-12 16:00:46 +01:00
Metallicow
230bf5d6d3
Optimize All PNGs Nov2018
...
Since I had to fix a image issue and optimize it. I decided to rerun FileOptimizer 13.30.2393 over all pngs. Small bytes for some that had been optimized before, but this comit covers all pngs that may have been missed in the past. Maybe revisit running them all again in 2 years. Total time to process all pngs: approx 8 hours.
As technology improves this will only get better/faster when downloading, loading in browser, embedded, etc...
2018-11-13 16:08:12 -06:00
Robin Dunn
e92d572267
Merge pull request #1057 from RobinD42/fix-issue1025
...
fix test suite errors in wx/py/tests
(cherry picked from commit ebb3de75ed )
2018-10-26 18:17:52 -07:00
Felipe Calliari
94e9a38085
fix DeprecationWarnings in frame.py ( #1043 )
...
This commit solves the following messages:
DeprecationWarning: Menu.Append() is deprecated
2018-10-24 19:27:47 -07:00
David N. Mashburn
12aed76e6b
Fixes save/ load bugs Pyslices
2018-08-26 11:25:15 -04:00
Mesalu
0f1861990d
Update introspect.py
...
Adds a check to determine if getfullargspec should be used. This is added in Py3 to get elements like type annotations.
2018-07-25 13:52:29 -07:00
Robin Dunn
705aa63d75
Merge branch 'more-windowidref' into wxPy-4.0.x
...
(cherry picked from commit ada7b2fc51 )
2018-06-25 19:12:00 -07:00
Robin Dunn
ce6f585444
Merge pull request #894 from tianzhuqiao/py
...
Fix a bug in py.introspect.getTokens
(cherry picked from commit 4b43671746 )
2018-06-23 18:26:36 -07:00
Robin Dunn
b1b0c9e297
wx.NewId() --> wx.ID_ANY or wx.Window.NewControlId() as appropriate
2018-06-19 10:31:56 -07:00
Robin Dunn
0c75ee6277
Merge pull request #867 from RobinD42/fix-issue855
...
im_func --> __func__
(cherry picked from commit 6b858b5966 )
2018-05-30 21:07:53 -07:00
Tianzhu Qiao
587c24957f
Add option to not use stock IDs in context-menu of pyshell.
...
Otherwise, the context-menu may not work on Mac without adding the proper IDs
to the menu bar.
2018-05-01 23:02:37 -07:00
Tianzhu Qiao
8b8bd630f2
Fix a python3 compatibility issue to get class instance and function objects
2018-04-21 08:51:28 -07:00
Robin Dunn
bbb19777b3
QnD fix for missing self.shell attribute
2018-03-27 19:30:36 -07:00
Metallicow
99834ab3ec
⁉️ Trim trailing whitespace misc files
...
All these files seem like legit trailing whitespace that can be removed.
2018-01-16 09:37:04 -06:00
Bob White
7b41a3e58f
Using functools.cmp_to_key for old style sorts.
2017-09-07 12:15:38 -05:00
Bob White
251f9d7d5a
Fix for list.sort requiring keywords in python3.5
...
Python3.5 changed the parameters in list.sort to be keyword only
arguments.
This fixes all the instances I could find.
2017-09-07 09:35:33 -05:00
Robin Dunn
4d00ac9b93
Wait a little longer before splitting
2017-07-21 13:20:27 -07:00
Robin Dunn
96adef7c60
Fix some Py3 compatibility issues
2017-05-17 17:46:33 -07:00
Metallicow
6e0ec5421f
Trim Whitespace py directory
2016-10-12 22:12:43 -05:00
Robin Dunn
3b8646441c
Fix loading/saving history in PyCrust on Python3
2016-09-07 11:05:14 -07:00
Robin Dunn
7761e1fba7
Change file() --> open()
2016-09-02 22:17:02 -07:00
Robin Dunn
af19f6c4cb
Explicitly disconnect dispatcher receivers when windows are no longer valid.
...
The weak reference cleanup sometimes seems to not happen immediately...
2016-09-02 22:15:16 -07:00
Robin Dunn
5db387e560
Ensure the filling window has been split
2016-09-02 10:53:28 -07:00
Robin Dunn
ed4756b902
Remove wx.lib.six and use the stock six module instead,
...
and add it as an installation dependency.
2016-06-30 20:07:57 -07:00
Scott Talbert
a57bec2e71
Add support for building with GTK3
2016-02-29 20:22:58 -05:00
Robin Dunn
2c3b7a813d
wx.YieldIfNeeded doesn't exist in Phoenix.
...
This fixes going into help mode in PyShell.
2015-03-12 13:51:51 -07:00
Werner F Bruhin
f0240987c0
- make it work in Py2 and Py3
2014-06-10 13:15:36 +02:00
Robin Dunn
283152cff0
Adapt to Py3 changes in tokenizer, method & function attribute names, etc.
...
Some general cleanup too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-16 03:02:36 +00:00
Robin Dunn
801682c786
Some Py3 fixes for PyCrust
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@76040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 07:48:20 +00:00
Robin Dunn
bcbdcd9631
Remove more CVS $Id$ and $Revision$ tags, and a bit of code that uses them.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-11 03:35:32 +00:00
Robin Dunn
571668a23f
Remove the old CVS $Id: tags.
...
They don't work in git, and don't work by default in SVN either.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-09 02:39:35 +00:00
Robin Dunn
c1beea6cfa
PR 39 from Metallicow. Py3 and Phoenix updates, Pen and Brush style updates
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-11 23:12:35 +00:00
Robin Dunn
9f24505715
Merge of PR 11 with the whitespace-only changes omitted.
...
See https://github.com/RobinD42/Phoenix/pull/11
Mostly phoenix-port changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74463 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 01:15:34 +00:00
Robin Dunn
2e30a88173
Some Py3 and various other fixes from wxGuru.
...
Merged and squashed from https://github.com/RobinD42/Phoenix/pull/15 ,
with additional edits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-05 20:54:22 +00:00
Robin Dunn
32c1e977c6
fix earlier patch
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@74111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-06 01:58:45 +00:00