Robin Dunn
de25f3091f
Merge pull request #1576 from pbrod/Fix_issue1570_use_of_tempfile
...
Fixes issue #1570 :
2020-04-01 15:40:07 -07:00
Per A. Brodtkorb
5cf6dc565e
Fixes #1570
...
Replaced the unsafe "tfname = tempfile.mktemp()" call with
"with tempfile.NamedTemporaryFile(delete=False) as fid: tfname = fid.name"
Also removed unused "import glob"
2020-03-25 11:27:49 +01: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
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
Robin Dunn
764abb41bf
Don't use relative imports in the tools scripts
2020-03-20 15:21:23 -07:00
Robin Dunn
9f2cc54b48
Update copyright years
2020-03-10 11:41:39 -07:00
Robin Dunn
b77c88a280
Merge tag 'wxPython-4.0.2' into wxPy-4.0.x
...
(cherry picked from commit 4c56c39e52 )
2018-06-17 22:04:22 -07:00
Mike Driscoll
435d779e8b
Update img2py.py
...
Fix a couple of typos
2017-05-02 09:11:04 -05:00
Robin Dunn
a0604d128c
Update copyright in wx/tools
2017-02-13 17:07:39 -08:00
Metallicow
576cf1d966
Trim Whitespace tools directory
2016-10-12 22:15:25 -05: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
37b08e317d
Fix import for Py3
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-25 08:27:58 +00:00
Robin Dunn
fbda4deb28
Fix some "wxPython" package names --> "wx" in comments, etc.
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@75580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 05:39:16 +00:00
Robin Dunn
087ebf6655
Patch from Ramin Sabet to update image tools modules for Phoenix and Py3
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-02-16 03:24:46 +00:00
Robin Dunn
247673201b
Copy (branch) wx.lib, wx.py and wx.tools from Classic, and include subpackages branched from 3rdParty
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-13 01:36:07 +00:00