Author: bugman Date: Tue Mar 12 16:34:16 2013 New Revision: 18801 URL: http://svn.gna.org/viewcvs/relax?rev=18801&view=rev Log: Added a more informative error message if the platform module is missing. This is for Python <= 2.2. The file from http://hg.python.org/cpython/file/2.3/Lib/platform.py can simply be copied into the lib/pythonX.X/ directory to fix this. Modified: trunk/compat.py Modified: trunk/compat.py URL: http://svn.gna.org/viewcvs/relax/trunk/compat.py?rev=18801&r1=18800&r2=18801&view=diff ============================================================================== --- trunk/compat.py (original) +++ trunk/compat.py Tue Mar 12 16:34:16 2013 @@ -21,6 +21,13 @@ # Module docstring. """Temporary module for allowing relax to support both Python 2 and 3.""" + +# The platform script message. +try: + import platform +except ImportError: + print("The platform module cannot be imported. Try copying the platform.py file from http://hg.python.org/cpython/file/2.3/Lib/platform.py into your lib/pythonX.X/ directory.") + raise # Dependency check module. import dep_check