|
From: <md...@us...> - 2010-06-02 02:22:22
|
Revision: 8365
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8365&view=rev
Author: mdehoon
Date: 2010-06-02 02:22:16 +0000 (Wed, 02 Jun 2010)
Log Message:
-----------
Check if Python is installed as a framework, and print a warning otherwise.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
Modified: trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py 2010-06-01 19:06:28 UTC (rev 8364)
+++ trunk/matplotlib/lib/matplotlib/backends/backend_macosx.py 2010-06-02 02:22:16 UTC (rev 8365)
@@ -2,6 +2,7 @@
import os
import numpy
+import MacOS
from matplotlib._pylab_helpers import Gcf
from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\
@@ -222,6 +223,9 @@
"""
Create a new figure manager instance
"""
+ if not MacOS.WMAvailable():
+ import warnings
+ warnings.warn("Python is not installed as a framework. The MacOSX backend may not work correctly if Python is not installed as a framework. Please see the Python documentation for more information on installing Python as a framework on Mac OS X")
FigureClass = kwargs.pop('FigureClass', Figure)
figure = FigureClass(*args, **kwargs)
canvas = FigureCanvasMac(figure)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|