mailr6693 - /1.3/prompt/molmol.py


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

Header


Content

Posted by sebastien . morin . 1 on July 04, 2008 - 20:35:
Author: semor
Date: Fri Jul  4 20:01:41 2008
New Revision: 6693

URL: http://svn.gna.org/viewcvs/relax?rev=6693&view=rev
Log:
Conversion of force flags to bools.


Modified:
    1.3/prompt/molmol.py

Modified: 1.3/prompt/molmol.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/molmol.py?rev=6693&r1=6692&r2=6693&view=diff
==============================================================================
--- 1.3/prompt/molmol.py (original)
+++ 1.3/prompt/molmol.py Fri Jul  4 20:01:41 2008
@@ -304,7 +304,7 @@
         molmol.view()
 
 
-    def write(self, data_type=None, style="classic", colour_start=None, 
colour_end=None, colour_list=None, file=None, dir='molmol', force=0):
+    def write(self, data_type=None, style="classic", colour_start=None, 
colour_end=None, colour_list=None, file=None, dir='molmol', force=False):
         """Function for creating Molmol macros.
 
         Keyword Arguments
@@ -325,7 +325,7 @@
 
         dir:  The directory name.
 
-        force:  A flag which, if set to 1, will cause the file to be 
overwritten.
+        force:  A flag which, if set to True, will cause the file to be 
overwritten.
 
 
         Description
@@ -412,8 +412,8 @@
             raise RelaxNoneStrError, ('directory name', dir)
 
         # The force flag.
-        if type(force) != int or (force != 0 and force != 1):
-            raise RelaxBinError, ('force flag', force)
+        if type(force) != bool:
+            raise RelaxBoolError, ('force flag', force)
 
         # Execute the functional code.
         molmol.write(data_type=data_type, style=style, 
colour_start=colour_start, colour_end=colour_end, colour_list=colour_list, 
file=file, dir=dir, force=force)




Related Messages


Powered by MHonArc, Updated Fri Jul 04 21:00:24 2008