Author: bugman Date: Mon Mar 12 18:12:49 2012 New Revision: 15472 URL: http://svn.gna.org/viewcvs/relax?rev=15472&view=rev Log: Merged revisions 15471 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r15471 | bugman | 2012-03-12 15:26:57 +0100 (Mon, 12 Mar 2012) | 5 lines Added some code to detect the bit version of MS Windows in the information print out. This should help better determine if 32 or 64-bit Windows is being used. ........ Modified: branches/frame_order_testing/ (props changed) branches/frame_order_testing/info.py Propchange: branches/frame_order_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Mar 12 18:12:49 2012 @@ -1,1 +1,1 @@ -/1.3:1-15464 +/1.3:1-15471 Modified: branches/frame_order_testing/info.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/info.py?rev=15472&r1=15471&r2=15472&view=diff ============================================================================== --- branches/frame_order_testing/info.py (original) +++ branches/frame_order_testing/info.py Mon Mar 12 18:12:49 2012 @@ -28,7 +28,7 @@ if hasattr(ctypes, 'windll'): import ctypes.wintypes import numpy -from os import popen3 +from os import environ, popen3 import platform from string import split import sys @@ -397,6 +397,8 @@ text = text + (format % ("Distribution: ", (platform.dist()[0] + " " + platform.dist()[1] + " " + platform.dist()[2]))) if hasattr(platform, 'platform'): text = text + (format % ("Full platform string: ", (platform.platform()))) + if hasattr(ctypes, 'windll'): + text = text + (format % ("Windows architecture: ", (self.win_arch()))) # Python info. text = text + ("\nPython information:\n") @@ -436,6 +438,25 @@ return text + def win_arch(self): + """Determine the MS Windows architecture. + + @return: The architecture string. + @rtype: str + """ + + # 64-bit versions. + if environ.has_key('PROCESSOR_ARCHITEW6432'): + arch = environ['PROCESSOR_ARCHITEW6432'] + + # Default 32-bit. + else: + arch = environ['PROCESSOR_ARCHITECTURE'] + + # Return the architecture. + return arch + + class MemoryStatusEx(ctypes.Structure): """Special object for obtaining hardware info in MS Windows."""