SF.net SVN: matplotlib: [5191] branches/v0_91_maint/lib/matplotlib/backends /backend_agg.py
Revision: 5191 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5191&view=rev Author: mdboom Date: 2008-05-19 05:12:30 -0700 (Mon, 19 May 2008) Log Message: --- Use is_string_like instead of explicitly string or unicode. Modified Paths: -- branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py Modified: branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py === --- branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py 2008-05-19 01:10:11 UTC (rev 5190) +++ branches/v0_91_maint/lib/matplotlib/backends/backend_agg.py 2008-05-19 12:12:30 UTC (rev 5191) @@ -389,14 +389,14 @@ def print_raw(self, filename_or_obj, *args, **kwargs): self.draw() -if type(filename_or_obj) in (str, unicode): +if is_string_like(filename_or_obj): filename_or_obj = file(filename_or_obj, 'wb') self.get_renderer()._renderer.write_rgba(filename_or_obj) print_rgba = print_raw def print_png(self, filename_or_obj, *args, **kwargs): self.draw() -if type(filename_or_obj) in (str, unicode): +if is_string_like(filename_or_obj): filename_or_obj = file(filename_or_obj, 'wb') self.get_renderer()._renderer.write_png(filename_or_obj, self.figure.dpi.get()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [5192] trunk/matplotlib
Revision: 5192 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5192&view=rev Author: mdboom Date: 2008-05-19 05:55:47 -0700 (Mon, 19 May 2008) Log Message: --- THIS MERGE IS NOT AS BIG AS IT LOOKS -- It is to correct an error where somehow the svnmerge history was lost. This merge is in fact only of r5191. I have left the revision ranges that svnmerge did here, but edited the log list to only include r5191. Merged revisions 4817-5171,5173-5177,5180,5182-5188,5190-5191 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint r5191 | mdboom | 2008-05-19 08:12:30 -0400 (Mon, 19 May 2008) | 2 lines Use is_string_like instead of explicitly string or unicode. Modified Paths: -- trunk/matplotlib/lib/matplotlib/axes.py trunk/matplotlib/lib/matplotlib/backends/backend_agg.py Property Changed: trunk/matplotlib/ Property changes on: trunk/matplotlib ___ Name: svnmerge-integrated - /branches/v0_91_maint:1-4816,5172,5178-5179,5181,5189 + /branches/v0_91_maint:1-5191 Modified: trunk/matplotlib/lib/matplotlib/axes.py === --- trunk/matplotlib/lib/matplotlib/axes.py 2008-05-19 12:12:30 UTC (rev 5191) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-05-19 12:55:47 UTC (rev 5192) @@ -331,7 +331,6 @@ self.set_patchprops(seg, **kwargs) ret.append(seg) - if self.command == 'plot': func = makeline else: func = makefill if multicol: @@ -2818,7 +2817,6 @@ autoscaled; default True. See Axes.autoscale_view for more information """ - scalex = kwargs.pop( 'scalex', True) scaley = kwargs.pop( 'scaley', True) @@ -3757,7 +3755,7 @@ xlolims=False, xuplims=False, **kwargs): """ ERRORBAR(x, y, yerr=None, xerr=None, - fmt='b-', ecolor=None, elinewidth=None, capsize=3, + fmt='b-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False) @@ -5472,7 +5470,7 @@ if not self._hold: self.cla() n, bins = np.histogram(x, bins, range=None, normed=bool(normed), new=True) - + if cumulative: if normed: n = (n * np.diff(bins)).cumsum() Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-19 12:12:30 UTC (rev 5191) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-19 12:55:47 UTC (rev 5192) @@ -289,7 +289,7 @@ renderer = self.get_renderer() original_dpi = renderer.dpi renderer.dpi = self.figure.dpi -if type(filename_or_obj) in (str, unicode): +if is_string_like(filename_or_obj): filename_or_obj = opefile(filename_or_obj, 'wb') renderer._renderer.write_rgba(filename_or_obj) renderer.dpi = original_dpi @@ -300,7 +300,7 @@ renderer = self.get_renderer() original_dpi = renderer.dpi renderer.dpi = self.figure.dpi -if type(filename_or_obj) in (str, unicode): +if is_string_like(filename_or_obj): filename_or_obj = file(filename_or_obj, 'wb') self.get_renderer()._renderer.write_png(filename_or_obj, self.figure.dpi) renderer.dpi = original_dpi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [5193] branches/v0_91_maint
Revision: 5193
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5193&view=rev
Author: mdboom
Date: 2008-05-19 12:05:23 -0700 (Mon, 19 May 2008)
Log Message:
---
[ 1966974 ] win32FontDirectory() can fail with access denied (Thanks,
Patrik Simons)
Modified Paths:
--
branches/v0_91_maint/CHANGELOG
branches/v0_91_maint/lib/matplotlib/font_manager.py
Modified: branches/v0_91_maint/CHANGELOG
===
--- branches/v0_91_maint/CHANGELOG 2008-05-19 12:55:47 UTC (rev 5192)
+++ branches/v0_91_maint/CHANGELOG 2008-05-19 19:05:23 UTC (rev 5193)
@@ -1,3 +1,6 @@
+2008-05-19 Fix crash when Windows can not access the registry to
+ determine font path [Bug 1966974, thanks Patrik Simons] - MGD
+
2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD
2008-05-09 Fix /singlequote (') in Postscript backend - MGD
Modified: branches/v0_91_maint/lib/matplotlib/font_manager.py
===
--- branches/v0_91_maint/lib/matplotlib/font_manager.py 2008-05-19 12:55:47 UTC
(rev 5192)
+++ branches/v0_91_maint/lib/matplotlib/font_manager.py 2008-05-19 19:05:23 UTC
(rev 5193)
@@ -107,14 +107,17 @@
except ImportError:
pass # Fall through to default
else:
-user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
try:
+user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders)
try:
-return _winreg.QueryValueEx(user, 'Fonts')[0]
-except OSError:
-pass # Fall through to default
-finally:
-_winreg.CloseKey(user)
+try:
+return _winreg.QueryValueEx(user, 'Fonts')[0]
+except OSError:
+pass # Fall through to default
+finally:
+_winreg.CloseKey(user)
+except OSError:
+pass # Fall through to default
return os.path.join(os.environ['WINDIR'], 'Fonts')
def win32InstalledFonts(directory=None, fontext='ttf'):
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [5194] trunk/matplotlib/lib/matplotlib/backends/ backend_agg.py
Revision: 5194 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5194&view=rev Author: mdboom Date: 2008-05-19 12:07:47 -0700 (Mon, 19 May 2008) Log Message: --- Remove typo. Modified Paths: -- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py Modified: trunk/matplotlib/lib/matplotlib/backends/backend_agg.py === --- trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-19 19:05:23 UTC (rev 5193) +++ trunk/matplotlib/lib/matplotlib/backends/backend_agg.py 2008-05-19 19:07:47 UTC (rev 5194) @@ -290,7 +290,7 @@ original_dpi = renderer.dpi renderer.dpi = self.figure.dpi if is_string_like(filename_or_obj): -filename_or_obj = opefile(filename_or_obj, 'wb') +filename_or_obj = file(filename_or_obj, 'wb') renderer._renderer.write_rgba(filename_or_obj) renderer.dpi = original_dpi print_rgba = print_raw This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
SF.net SVN: matplotlib: [5195] trunk/matplotlib
Revision: 5195 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5195&view=rev Author: mdboom Date: 2008-05-19 12:09:35 -0700 (Mon, 19 May 2008) Log Message: --- Merged revisions 5192-5193 via svnmerge from https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v0_91_maint r5193 | mdboom | 2008-05-19 15:05:23 -0400 (Mon, 19 May 2008) | 3 lines [ 1966974 ] win32FontDirectory() can fail with access denied (Thanks, Patrik Simons) Modified Paths: -- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/font_manager.py Property Changed: trunk/matplotlib/ Property changes on: trunk/matplotlib ___ Name: svnmerge-integrated - /branches/v0_91_maint:1-5191 + /branches/v0_91_maint:1-5193 Modified: trunk/matplotlib/CHANGELOG === --- trunk/matplotlib/CHANGELOG 2008-05-19 19:07:47 UTC (rev 5194) +++ trunk/matplotlib/CHANGELOG 2008-05-19 19:09:35 UTC (rev 5195) @@ -1,3 +1,6 @@ +2008-05-19 Fix crash when Windows can not access the registry to + determine font path [Bug 1966974, thanks Patrik Simons] - MGD + 2008-05-16 removed some unneeded code w/ the python 2.4 requirement. cbook no longer provides compatibility for reversed, enumerate, set or izip. removed lib/subprocess, mpl1, Modified: trunk/matplotlib/lib/matplotlib/font_manager.py === --- trunk/matplotlib/lib/matplotlib/font_manager.py 2008-05-19 19:07:47 UTC (rev 5194) +++ trunk/matplotlib/lib/matplotlib/font_manager.py 2008-05-19 19:09:35 UTC (rev 5195) @@ -107,14 +107,17 @@ except ImportError: pass # Fall through to default else: -user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders) try: +user = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, MSFolders) try: -return _winreg.QueryValueEx(user, 'Fonts')[0] -except OSError: -pass # Fall through to default -finally: -_winreg.CloseKey(user) +try: +return _winreg.QueryValueEx(user, 'Fonts')[0] +except OSError: +pass # Fall through to default +finally: +_winreg.CloseKey(user) +except OSError: +pass # Fall through to default return os.path.join(os.environ['WINDIR'], 'Fonts') def win32InstalledFonts(directory=None, fontext='ttf'): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins
