mailr5304 - in /1.3: generic_fns/structure/scientific.py generic_fns/structure/structure.py relax


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

Header


Content

Posted by edward on April 04, 2008 - 15:41:
Author: bugman
Date: Fri Apr  4 15:41:42 2008
New Revision: 5304

URL: http://svn.gna.org/viewcvs/relax?rev=5304&view=rev
Log:
Converted Scientific Python from a dependancy to an optional Python package.

Of course since this is the only PDB parser in relax at the moment, if 
Scientific Python is not
installed, then PDB files cannot be read.


Modified:
    1.3/generic_fns/structure/scientific.py
    1.3/generic_fns/structure/structure.py
    1.3/relax

Modified: 1.3/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=5304&r1=5303&r2=5304&view=diff
==============================================================================
--- 1.3/generic_fns/structure/scientific.py (original)
+++ 1.3/generic_fns/structure/scientific.py Fri Apr  4 15:41:42 2008
@@ -23,8 +23,14 @@
 # Python module imports.
 from math import sqrt
 from numpy import dot, float64, zeros
-import Scientific.IO.PDB
 from warnings import warn
+
+# Scientific Python import.
+module_avail = True
+try:
+    import Scientific.IO.PDB
+except ImportError:
+    module_avail = False
 
 # relax module imports.
 from data import Data as relax_data_store

Modified: 1.3/generic_fns/structure/structure.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/structure.py?rev=5304&r1=5303&r2=5304&view=diff
==============================================================================
--- 1.3/generic_fns/structure/structure.py (original)
+++ 1.3/generic_fns/structure/structure.py Fri Apr  4 15:41:42 2008
@@ -25,7 +25,6 @@
 from numpy import arccos, array, dot, eye, float64, zeros
 from os import F_OK, access
 from re import compile, match
-import Scientific.IO.PDB
 from string import ascii_uppercase
 from warnings import warn
 

Modified: 1.3/relax
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax?rev=5304&r1=5303&r2=5304&view=diff
==============================================================================
--- 1.3/relax (original)
+++ 1.3/relax Fri Apr  4 15:41:42 2008
@@ -48,13 +48,6 @@
     import Numeric
 except ImportError:
     sys.stderr.write("The dependency 'Numeric' has not been installed.\n")
-    sys.exit()
-
-# Scientific.
-try:
-    import Scientific
-except ImportError:
-    sys.stderr.write("The dependency 'Scientific' has not been installed.\n")
     sys.exit()
 
 # Command line option parser.




Related Messages


Powered by MHonArc, Updated Fri Apr 04 16:20:09 2008