From 6af96cf9c8868a9ebb62e4e99cfbc6d8aa28082e Mon Sep 17 00:00:00 2001 From: Samer Afach Date: Thu, 12 Jan 2017 21:07:25 +0100 Subject: [PATCH] Some refactoring --- spintrum/spintrum.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spintrum/spintrum.py b/spintrum/spintrum.py index 43104d3..0d12d16 100644 --- a/spintrum/spintrum.py +++ b/spintrum/spintrum.py @@ -6,18 +6,17 @@ import numpy as np import os import mpmath + def _print_error(msg_str): sys.stderr.write(msg_str + "\n") sys.stderr.flush() - try: _OpenBLASLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)),"OpenBLAS_install/lib/libopenblas.so.0") c.CDLL(_OpenBLASLibPath) except OSError: _print_error("Warning: Failed to load OpenBLAS in its default place. Excepting the library to be available from the system.") - -_SpintrumLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)),"lib/libspintrum.so") +_SpintrumLibPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/libspintrum.so") if not os.path.exists(_SpintrumLibPath): msg = "WARNING: Could not load the spintrum shared library in path " \ + _SpintrumLibPath + ". This means that the installation is not valid " \