mailr22809 - /trunk/devel_scripts/python_seek.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 17, 2014 - 19:39:
Author: bugman
Date: Thu Apr 17 19:39:21 2014
New Revision: 22809

URL: http://svn.gna.org/viewcvs/relax?rev=22809&view=rev
Log:
Added the matplotlib module to the Python binary and module seeking script.


Modified:
    trunk/devel_scripts/python_seek.py

Modified: trunk/devel_scripts/python_seek.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/python_seek.py?rev=22809&r1=22808&r2=22809&view=diff
==============================================================================
--- trunk/devel_scripts/python_seek.py  (original)
+++ trunk/devel_scripts/python_seek.py  Thu Apr 17 19:39:21 2014
@@ -53,6 +53,7 @@
     'Scientific',
     'numpy',
     'scipy',
+    'matplotlib',
     'wx',
     'mpi4py',
     'epydoc'
@@ -95,6 +96,8 @@
                 self.version_numpy(file)
             if 'scipy' in self.module_list:
                 self.version_scipy(file)
+            if 'matplotlib' in self.module_list:
+                self.version_matplotlib(file)
             if 'wx' in self.module_list:
                 self.version_wx(file)
             if 'mpi4py' in self.module_list:
@@ -250,6 +253,23 @@
 
         # Execute and print the version
         self.execute(label="epydoc:", file=file, commands=commands)
+
+
+    def version_matplotlib(self, file=None):
+        """Determine and print out the matplotlib module version info."""
+
+        # The commands.
+        commands = [
+            "try:\n",
+            "    import matplotlib\n",
+            "    version = matplotlib.__version__\n",
+            "except:\n",
+            "    version = '-'\n",
+            "print(version)\n",
+        ]
+
+        # Execute and print the version
+        self.execute(label="matplotlib:", file=file, commands=commands)
 
 
     def version_minfx(self, file=None):




Related Messages


Powered by MHonArc, Updated Mon Apr 21 21:40:03 2014