mailr20188 - in /branches/relax_disp: ./ lib/io.py


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

Header


Content

Posted by edward on June 18, 2013 - 10:02:
Author: bugman
Date: Tue Jun 18 10:02:17 2013
New Revision: 20188

URL: http://svn.gna.org/viewcvs/relax?rev=20188&view=rev
Log:
Merged revisions 20187 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk

........
  r20187 | bugman | 2013-06-18 10:00:50 +0200 (Tue, 18 Jun 2013) | 17 lines
  
  Fix for bug #20915, (https://gna.org/bugs/?20915) - Failure of Grace 
opening in MS Windows
  
  Troels E. Linnet provided this patch, and was discovered during work on a 
Windows 7 system: telinnet
  aaattt bio_dot_ku_dot_dk
  
  This is a small fix for a wrong call to "raise 
RelaxMissingBinaryError(binary)", when issuing an
  external call to xmgrace.
  
  The "path_sep" would be equal = [\/], and the RE search would not 
find(True) the full path specified
  for the xmgrace file.  This is now shifted to python: os.path.isfile
  http://docs.python.org/2/library/os.path.html
  
  Another fix, is that as a standard the command "xmgrace" is provided. This 
will work fine through
  windows cmd, but the true name for program in windows is "xmgrace.exe", and 
so an additional search
  for +".exe" is also performed. 
........

Modified:
    branches/relax_disp/   (props changed)
    branches/relax_disp/lib/io.py

Propchange: branches/relax_disp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jun 18 10:02:17 2013
@@ -1,1 +1,1 @@
-/trunk:1-20183
+/trunk:1-20187

Modified: branches/relax_disp/lib/io.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/io.py?rev=20188&r1=20187&r2=20188&view=diff
==============================================================================
--- branches/relax_disp/lib/io.py (original)
+++ branches/relax_disp/lib/io.py Tue Jun 18 10:02:17 2013
@@ -33,7 +33,7 @@
 # Python module imports.
 from os import devnull
 from os import F_OK, X_OK, access, altsep, getenv, makedirs, pathsep, 
remove, sep
-from os.path import expanduser, basename, splitext
+from os.path import expanduser, basename, splitext, isfile
 from re import search
 import sys
 from sys import stdin, stdout, stderr
@@ -718,7 +718,7 @@
         path_sep = sep
 
     # The full path of the program has been given (if a directory separatory 
has been supplied).
-    if search(path_sep, binary):
+    if isfile(binary):
         # Test that the binary exists.
         if not access(binary, F_OK):
             raise RelaxMissingBinaryError(binary)
@@ -737,7 +737,7 @@
 
         # Test that the binary exists within the system path (and exit this 
function instantly once it has been found).
         for path in path_list:
-            if access(path + sep + binary, F_OK):
+            if access(path + sep + binary, F_OK) or access(path + sep + 
binary +".exe", F_OK):
                 return
 
         # The binary is not located in the system path!




Related Messages


Powered by MHonArc, Updated Tue Jun 18 11:00:02 2013