Hi, This needs some slight modifications as it overwrites the message: ImportError: relaxation curve fitting is unavailable, the corresponding C modules have not been compiled. Both ImportError messages should probably be shown. Regards, Edward On Tue, Feb 17, 2009 at 7:14 PM, <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor Date: Tue Feb 17 19:14:20 2009 New Revision: 8818 URL: http://svn.gna.org/viewcvs/relax?rev=8818&view=rev Log: Added dependency check for relaxation dispersion C modules. This follows r8817. Modified: branches/relax_disp/dep_check.py Modified: branches/relax_disp/dep_check.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/dep_check.py?rev=8818&r1=8817&r2=8818&view=diff ============================================================================== --- branches/relax_disp/dep_check.py (original) +++ branches/relax_disp/dep_check.py Tue Feb 17 19:14:20 2009 @@ -140,3 +140,26 @@ # Set the flag. C_module_exp_fn = False + +# Relaxation dispersion. +try: + from maths_fns.relax_disp import setup + del setup + C_module_exp_fn = True +except ImportError, message: + # The OS. + system = platform.system() + + # Does the compiled file exist. + file = 'relax_disp.so' + if system == 'Windows' or system == 'Microsoft': + file = 'relax_disp.pyd' + if not access('maths_fns' + sep + file, F_OK): + C_module_exp_fn_mesg = "ImportError: relaxation dispersion is unavailable, the corresponding C modules have not been compiled." + + # Show the full error. + else: + C_module_exp_fn_mesg = "ImportError: " + message[0] + "\nRelaxation dispersion is unavailable, try compiling the C modules." + + # Set the flag. + C_module_exp_fn = False _______________________________________________ relax (http://nmr-relax.com) This is the relax-commits mailing list relax-commits@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-commits