Author: semor Date: Fri Jul 4 19:32:51 2008 New Revision: 6690 URL: http://svn.gna.org/viewcvs/relax?rev=6690&view=rev Log: Conversion of force flags to bools. Modified: 1.3/prompt/palmer.py Modified: 1.3/prompt/palmer.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/palmer.py?rev=6690&r1=6689&r2=6690&view=diff ============================================================================== --- 1.3/prompt/palmer.py (original) +++ 1.3/prompt/palmer.py Fri Jul 4 19:32:51 2008 @@ -42,7 +42,7 @@ self.__relax__ = relax - def create(self, dir=None, force=0, binary='modelfree4', diff_search='none', sims=0, sim_type='pred', trim=0, steps=20, constraints=1, heteronuc_type='15N', atom1='N', atom2='H'): + def create(self, dir=None, force=False, binary='modelfree4', diff_search='none', sims=0, sim_type='pred', trim=0, steps=20, constraints=1, heteronuc_type='15N', atom1='N', atom2='H'): """Function for creating the Modelfree4 input files. Keyword Arguments @@ -50,8 +50,8 @@ dir: The directory to place the files. - force: A flag which if set to 1 will cause the results file to be overwritten if it already - exists. + force: A flag which if set to True will cause the results file to be overwritten if it + already exists. binary: The name of the executable Modelfree program file. @@ -120,8 +120,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) # The Modelfree executable file. if type(binary) != str: @@ -167,7 +167,7 @@ palmer.create(dir=dir, force=force, binary=binary, diff_search=diff_search, sims=sims, sim_type=sim_type, trim=trim, steps=steps, constraints=constraints, heteronuc_type=heteronuc_type, atom1=atom1, atom2=atom2) - def execute(self, dir=None, force=0, binary='modelfree4'): + def execute(self, dir=None, force=False, binary='modelfree4'): """Function for executing Modelfree4. Keyword Arguments @@ -175,8 +175,8 @@ dir: The directory to place the files. - force: A flag which if set to 1 will cause the results file to be overwritten if it already - exists. + force: A flag which if set to True will cause the results file to be overwritten if it + already exists. binary: The name of the executable Modelfree program file. @@ -211,8 +211,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) # The Modelfree executable file. if type(binary) != str: