From: david-sarah Date: Sun, 26 Dec 2010 02:32:06 +0000 (-0800) Subject: Remove src/allmydata/util/find_exe.py which is no longer used. fixes #1150 X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/%22doc.html/quickstart.html?a=commitdiff_plain;h=399ee5aea0c9b8d4fc9d668fb6f15ce381fa9aea;p=tahoe-lafs%2Ftahoe-lafs.git Remove src/allmydata/util/find_exe.py which is no longer used. fixes #1150 --- diff --git a/src/allmydata/util/find_exe.py b/src/allmydata/util/find_exe.py deleted file mode 100644 index 22a2f1bb..00000000 --- a/src/allmydata/util/find_exe.py +++ /dev/null @@ -1,28 +0,0 @@ -import os, sys -from twisted.python.procutils import which - -def find_exe(exename): - """ - Look for something named exename or exename + ".py". - - This is a kludge. - - @return: a list containing one element which is the path to the exename - (if it is thought to be executable), or else the first element being - sys.executable and the second element being the path to the - exename + ".py", or else return False if one can't be found - """ - exes = which(exename) - exe = exes and exes[0] - if not exe: - exe = os.path.join(sys.prefix, 'scripts', exename + '.py') - if os.path.exists(exe): - path, ext = os.path.splitext(exe) - if ext.lower() in [".exe", ".bat",]: - cmd = [exe,] - else: - cmd = [sys.executable, exe,] - return cmd - else: - return False -