* src/plugins/GraphViz.py: launch image viewer in Windows.

* src/Mime/_WinMime.py: handle rundll32.exe applications.
* src/Utils.py: search path in Windows when looking for applications.

svn: r7055
This commit is contained in:
Brian Matherly
2006-07-22 05:52:16 +00:00
parent bf1d752f01
commit 75fe94b45a
4 changed files with 27 additions and 24 deletions

View File

@ -461,10 +461,16 @@ def search_for(name):
name = name.split('"')[1]
else:
name = name.split()[0]
for i in os.environ['PATH'].split(':'):
fname = os.path.join(i,name)
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
return 1
if os.sys.platform == "win32":
for i in os.environ['PATH'].split(';'):
fname = os.path.join(i,name)
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
return 1
else:
for i in os.environ['PATH'].split(':'):
fname = os.path.join(i,name)
if os.access(fname,os.X_OK) and not os.path.isdir(fname):
return 1
return 0
#-------------------------------------------------------------------------