Author: bugman Date: Mon Jun 23 16:36:47 2014 New Revision: 24251 URL: http://svn.gna.org/viewcvs/relax?rev=24251&view=rev Log: Improved how the relax installation path is determined in the status object. If the path cannot be found, the current working directory is then checked if it is where relax is installed. This is needed when importing modules outside of relax. Modified: trunk/status.py Modified: trunk/status.py URL: http://svn.gna.org/viewcvs/relax/trunk/status.py?rev=24251&r1=24250&r2=24251&view=diff ============================================================================== --- trunk/status.py (original) +++ trunk/status.py Mon Jun 23 16:36:47 2014 @@ -24,7 +24,7 @@ """Module containing the status singleton object.""" # Python module imports. -from os import F_OK, access +from os import F_OK, access, getcwd from os.path import sep import platform from re import search @@ -94,6 +94,10 @@ # Return the Mac Resources folder path. return mac_path + # Maybe the current directory? + if access(getcwd() + sep + file_to_find, F_OK): + return getcwd() + # Return the first entry of sys.path as a fallback. return sys.path[0]