Hi, For the creation of this directory, this will not work for those who do not have write access to the relax source code (i.e. installed by the root or administrative user). A better solution is to use 'tempfile.mkdtemp'. This will put it into the default system temporary directory (on my Linux system that's ~/tmp). It's probably best to have setUp() call this, and tearDown() delete this. As for passing this into the script, that's a little trickier. I would probably go for the hack of placing the directory name (which is returned by tempfile.mkdtemp) into the relax data store. This will then be accessible from the script and can be passed into the Modelfree4 user functions. The only possible issue with this is that the partition containing the temp directory fills up, but I don't think we have to worry about that (and tearDown() will clean up the mess). Regards, Edward On Tue, Jul 29, 2008 at 11:15 PM, <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor Date: Tue Jul 29 23:15:27 2008 New Revision: 7026 URL: http://svn.gna.org/viewcvs/relax?rev=7026&view=rev Log: A temporary directory is now created for ModelFree4 output. This directory is only created and the function for deleting it still needs to be added. This follows the proposal of Edward d'Auvergne at: https://mail.gna.org/public/relax-devel/2008-07/msg00038.html (message ID: 7f080ed10807290219m18601df6nf2df7e91848a9680@xxxxxxxxxxxxxx). Modified: 1.3/test_suite/system_tests/scripts/palmer.py Modified: 1.3/test_suite/system_tests/scripts/palmer.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/palmer.py?rev=7026&r1=7025&r2=7026&view=diff ============================================================================== --- 1.3/test_suite/system_tests/scripts/palmer.py (original) +++ 1.3/test_suite/system_tests/scripts/palmer.py Tue Jul 29 23:15:27 2008 @@ -1,7 +1,11 @@ # Script for model-free analysis using the program 'Modelfree4'. # Python module imports. +from os import chdir import sys + +# relax module imports. +from relax_io import mkdir_nofail # Set the stage of analysis. # @@ -119,6 +123,10 @@ # Set the run name (also the name of a preset model-free model). runs = ['m1', 'm2', 'm3'] +# Create a temporary directory for ModelFree4 outputs and move into it. +mkdir_nofail(sys.path[-1] + '/test_suite/system_tests/data/temp_palmer') +chdir(sys.path[-1] + '/test_suite/system_tests/data/temp_palmer') + # Run the stages. exec_stage_1(runs) exec_stage_2(runs) _______________________________________________ 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