mail[bug #22001] The execution of script changes current working directory


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

Header


Content

Posted by Troels E. Linnet on May 01, 2014 - 11:46:
URL:
  <http://gna.org/bugs/?22001>

                 Summary: The execution of script changes current working
directory
                 Project: relax
            Submitted by: tlinnet
            Submitted on: Thu 01 May 2014 09:46:51 AM UTC
                Category: None
Specific analysis category: None
                Priority: 7 - High
                Severity: 4 - Important
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: Repository: trunk
         Discussion Lock: Any
        Operating System: None

    _______________________________________________________

Details:

This illustrates the problem

tlinnet@linmac:~$ mkdir test ; cd test
tlinnet@linmac:test$ mkdir script        
tlinnet@linmac:test$ echo "import os" >> script/test.py
tlinnet@linmac:test$ echo "print(os.getcwd())" >> script/test.py
tlinnet@linmac:test$ relax script/test.py 



                                  relax repository checkout rNone
                                                None

                              Molecular dynamics by NMR data analysis

                             Copyright (C) 2001-2006 Edward d'Auvergne
                         Copyright (C) 2006-2014 the relax development team

This is free software which you are welcome to modify and redistribute under
the conditions of the
GNU General Public License (GPL).  This program, including all modules, is
licensed under the GPL
and comes with absolutely no warranty.  For details type 'GPL' within the
relax prompt.

Assistance in using the relax prompt and scripting interface can be accessed
by typing 'help' within
the prompt.

Processor fabric:  Uni-processor.

script = 'script/test.py'
----------------------------------------------------------------------------------------------------
import os
print(os.getcwd())
----------------------------------------------------------------------------------------------------
/Users/tlinnet/test/script



----------

This means that running:

relax $HOME/software/relax_trunk/sample_scripts/relax_disp/cpmg_analysis.py

puts the output data inside "sample_scripts" instead of the current working
folder.

This behaviour is not expected.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22001>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/




Related Messages


Powered by MHonArc, Updated Fri May 02 11:20:09 2014