Make use of new module constfunc.
svn: r14280
This commit is contained in:
parent
aa5548c1ea
commit
932eeac2d7
@ -36,7 +36,6 @@ import locale
|
|||||||
import random
|
import random
|
||||||
import time
|
import time
|
||||||
import shutil
|
import shutil
|
||||||
import platform
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -334,7 +333,7 @@ def get_unicode_path(path):
|
|||||||
:rtype: unicode
|
:rtype: unicode
|
||||||
:returns: The Unicode version of path.
|
:returns: The Unicode version of path.
|
||||||
"""
|
"""
|
||||||
if os.sys.platform == "win32":
|
if constfunc.win():
|
||||||
return unicode(path)
|
return unicode(path)
|
||||||
else:
|
else:
|
||||||
return unicode(path,sys.getfilesystemencoding())
|
return unicode(path,sys.getfilesystemencoding())
|
||||||
@ -392,7 +391,7 @@ def search_for(name):
|
|||||||
name = name.split('"')[1]
|
name = name.split('"')[1]
|
||||||
else:
|
else:
|
||||||
name = name.split()[0]
|
name = name.split()[0]
|
||||||
if os.sys.platform == "win32":
|
if constfunc.win():
|
||||||
for i in os.environ['PATH'].split(';'):
|
for i in os.environ['PATH'].split(';'):
|
||||||
fname = os.path.join(i, name)
|
fname = os.path.join(i, name)
|
||||||
if os.access(fname, os.X_OK) and not os.path.isdir(fname):
|
if os.access(fname, os.X_OK) and not os.path.isdir(fname):
|
||||||
|
Loading…
Reference in New Issue
Block a user