TEST=`which test` equivalent in python?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Sat Jan 24 18:13:15 EST 2009
En Sat, 24 Jan 2009 17:03:33 -0200, Jay Jesus Amorin
<jay.amorin at gmail.com> escribió:
> *SVNLOOK_PATH=os.system('which svnlook')*
You've been told what's wrong with that. But instead of fixing how to
invoke "which", use distutils.spawn.find_executable instead:
py> from distutils.spawn import find_executable
py> find_executable('svnlook')
'c:\\apps\\svn\\bin\\svnlook.exe'
--
Gabriel Genellina
More information about the Python-list
mailing list