Author: bugman Date: Tue Jun 24 09:39:02 2014 New Revision: 24262 URL: http://svn.gna.org/viewcvs/relax?rev=24262&view=rev Log: Merged revisions 24251,24257 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r24251 | bugman | 2014-06-23 16:36:47 +0200 (Mon, 23 Jun 2014) | 6 lines 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. ........ r24257 | bugman | 2014-06-23 20:12:02 +0200 (Mon, 23 Jun 2014) | 7 lines Hack to permanently eliminate the ^[[?1034h escape code being produced on Linux systems. This is produced by importing the readline module. The escape code will be sent to STDOUT every time relax is executed, so it will be present in all log files. The problem is the TERM environmental variable being set to 'xterm'. The hack simply sets TERM to an empty string. ........ Modified: branches/disp_spin_speed/ (props changed) branches/disp_spin_speed/relax.py branches/disp_spin_speed/status.py Propchange: branches/disp_spin_speed/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Jun 24 09:39:02 2014 @@ -1 +1 @@ -/trunk:1-24138 +/trunk:1-24261 Modified: branches/disp_spin_speed/relax.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/relax.py?rev=24262&r1=24261&r2=24262&view=diff ============================================================================== --- branches/disp_spin_speed/relax.py (original) +++ branches/disp_spin_speed/relax.py Tue Jun 24 09:39:02 2014 @@ -35,6 +35,10 @@ # Dependency checks. import dep_check + +# Eliminate the ^[[?1034h escape code being produced on Linux systems by the import of the readline module. +import os +os.environ['TERM'] = '' # Set up the Python 2 and 3 work-arounds. import lib.compat Modified: branches/disp_spin_speed/status.py URL: http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/status.py?rev=24262&r1=24261&r2=24262&view=diff ============================================================================== --- branches/disp_spin_speed/status.py (original) +++ branches/disp_spin_speed/status.py Tue Jun 24 09:39:02 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]