diff options
author | Alex Rønne Petersen <xtzgzorex@gmail.com> | 2011-11-10 22:31:15 +0400 |
---|---|---|
committer | Alex Rønne Petersen <xtzgzorex@gmail.com> | 2011-11-10 22:31:15 +0400 |
commit | e047f99f6df7b5c801102c03f903d4dd722b2989 (patch) | |
tree | efc14349c81e4b8f5cb02afb74ed70b383e1da9d /extras/PyBinding | |
parent | 18b196b2e2517a5135bd793322ff1ca3195a7b27 (diff) | |
parent | 04eb477cccc8237689ec3dfbe22d994de7038666 (diff) |
Merge pull request #120 from Shanto/patch-1
Consider python2.7 and python2 in PythonHelper
Diffstat (limited to 'extras/PyBinding')
-rw-r--r-- | extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs b/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs index a797280d16..194755229c 100644 --- a/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs +++ b/extras/PyBinding/PyBinding/PyBinding/PythonHelper.cs @@ -109,6 +109,13 @@ namespace PyBinding // next preferred type. try { + return new Python27Runtime () { + Path = Which ("python2.7") + }; + } + catch {} + + try { return new Python26Runtime () { Path = Which ("python2.6") }; @@ -129,8 +136,10 @@ namespace PyBinding public static string FindPreferredPython () { + try { return Which ("python2.7"); } catch {} try { return Which ("python2.6"); } catch {} try { return Which ("python2.5"); } catch {} + try { return Which ("python2"); } catch {} try { return Which ("python"); } catch {} throw new FileNotFoundException ("Could not locate python executable"); |