mailr15441 - /1.3/info.py


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

Header


Content

Posted by edward on March 06, 2012 - 15:15:
Author: bugman
Date: Tue Mar  6 15:15:10 2012
New Revision: 15441

URL: http://svn.gna.org/viewcvs/relax?rev=15441&view=rev
Log:
Expansion and improvement of the information printed out by 'relax --info'.

A number of details are now taken from the sys module.


Modified:
    1.3/info.py

Modified: 1.3/info.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/info.py?rev=15441&r1=15440&r2=15441&view=diff
==============================================================================
--- 1.3/info.py (original)
+++ 1.3/info.py Tue Mar  6 15:15:10 2012
@@ -27,6 +27,7 @@
 import numpy
 import platform
 from string import split
+import sys
 from textwrap import wrap
 
 # relax module imports.
@@ -321,9 +322,10 @@
             text = text + (format % ("Machine: ", platform.machine()))
         if hasattr(platform, 'processor'):
             text = text + (format % ("Processor: ", platform.processor()))
-
-        # System info.
-        text = text + ("\nSystem information:\n")
+        text = text + (format % ("Endianness: ", sys.byteorder))
+
+        # OS info.
+        text = text + ("\nOperating system information:\n")
         if hasattr(platform, 'system'):
             text = text + (format % ("System: ", platform.system()))
         if hasattr(platform, 'release'):
@@ -341,8 +343,8 @@
         if hasattr(platform, 'platform'):
             text = text + (format % ("Full platform string: ", 
(platform.platform())))
 
-        # Software info.
-        text = text + ("\nSoftware information:\n")
+        # Python info.
+        text = text + ("\nPython information:\n")
         if hasattr(platform, 'architecture'):
             text = text + (format % ("Architecture: ", 
(platform.architecture()[0] + " " + platform.architecture()[1])))
         if hasattr(platform, 'python_version'):
@@ -353,14 +355,17 @@
             text = text + ((format[:-1]+', %s\n') % ("Python build: ", 
platform.python_build()[0], platform.python_build()[1]))
         if hasattr(platform, 'python_compiler'):
             text = text + (format % ("Python compiler: ", 
platform.python_compiler()))
+        if hasattr(platform, 'libc_ver'):
+            text = text + (format % ("Libc version: ", 
(platform.libc_ver()[0] + " " + platform.libc_ver()[1])))
         if hasattr(platform, 'python_implementation'):
             text = text + (format % ("Python implementation: ", 
platform.python_implementation()))
         if hasattr(platform, 'python_revision'):
             text = text + (format % ("Python revision: ", 
platform.python_revision()))
-        if hasattr(numpy, '__version__'):
-            text = text + (format % ("Numpy version: ", numpy.__version__))
-        if hasattr(platform, 'libc_ver'):
-            text = text + (format % ("Libc version: ", 
(platform.libc_ver()[0] + " " + platform.libc_ver()[1])))
+        if sys.executable:
+            text = text + (format % ("Python executable: ", sys.executable))
+        text = text + (format % ("Python flags: ", sys.flags))
+        text = text + (format % ("Python float info: ", sys.float_info))
+        text = text + (format % ("Python module path: ", sys.path))
 
         # Python packages.
         text = text + self.package_info(format=format)




Related Messages


Powered by MHonArc, Updated Tue Mar 06 16:00:01 2012