From gvsteen at yahoo.com  Fri Sep  4 22:38:12 2009
From: gvsteen at yahoo.com (Guido van Steen)
Date: Fri, 4 Sep 2009 13:38:12 -0700 (PDT)
Subject: [Rd] Including a binary Python Interpreter into a binary
	R-package for MS Windows
In-Reply-To: <971536df0909031458y814cd67jf908799cc7857644@mail.gmail.com>
Message-ID: <765122.70709.qm@web65613.mail.ac4.yahoo.com>

Hi Gabor, 

--- On Thu, 9/3/09, Gabor Grothendieck <ggrothendieck at gmail.com> wrote:

> I've tried both these approaches.
> 
> See Ryacas source code to see an example of the binary
> download approach.
> It has the advantage that the software loads and runs
> faster.
> 
> Nevertheless, I moved from the binary download approach to
> the Jython approach
> for my next package, rSymPy, since Jython gives a single
> approach that works
> on all platforms and installation becomes a "no brainer"
> since its all
> self contained.

Unzipping an archive with e.g. "python.exe" and "python25.dll" should also be quite easy. Python's main modules would all be included in "python25.dll". For add-on modules you could use a modified import mechanism, so that you can place these modules one level deeper in the directory structure. 

> In fact, in most cases its just a matter of:
> install.packages("rSymPy").
> like any other package.
> 
> Thus while its true that Jython is slower but if usrs can't
> install it
> in the first place
> or its too difficult to install it no one will try it in
> the first
> place and then it
> does not matter how fast it is since it will be unused or
> less used.
> 
> One caveat is that although Jython does make installation
> much easier
> its still possible to have problems.? e.g. user does
> not have
> Java or has wrong version of Java or needs certain
> permissions.? On Vista
> they may need to run R elevated.? 

I can imagine. 

> I expect that as new
> versions of Jython
> become available (in fact a more recent one became
> available after the
> last release of rSymPy) things will further improve.
> 
> For more info on possible problems with each approach see
> the
> troubleshooting sections of Ryacas and rSymPy home pages:
> 
> http://Ryacas.googlecode.com
> http://rSymPy.googlecode.com

Thanks. I will take a look at both projects. 

Guido 






[Rd] Including a binary Python Interpreter into a binary R-package for MS Windows
Guido van Steen