If you can assume its on your path then try this: pth <- sapply(strsplit(Sys.getenv("PATH"), ";"), function(x) file.path(x, "python.exe", fsep = "\\")) pth[file.exists(pth)][1]
On Sat, Jun 27, 2009 at 11:44 AM, Carlos J. Gil Bellosta<c...@datanalytics.com> wrote: > Hello, > > I have been unsuccessfully struggling for a programmatical method to > find out whether and where Python is installed. > > The reason is that I am developing a package that depends on python. > > On UNIX/UNIX-like systems I can quite safely assume that python is > directly callable via system if installed. > > My main problems is Windows, though... > > Has anybody faced this problem before? > > Best regards, > > Carlos J. Gil Bellosta > http://www.datanalytics.com > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel