Peter wrote:
> On Sat, Jul 18, 2009 at 5:35 PM, Milton Cezar
> Ribeiro<miltinho.astrona...@gmail.com> wrote:
>> Hi Peter,
>>
>> Thanks for your help.
>> I must confess that I tryed to find the right link (with amd64 on the
>> filename) without luck up to now. If anyone know what is the link, please,
>> let me know.
> 
> There are both 32 and 64 bit Windows installers for Mark
> Hammond's windows extensions here (including Python 2.6,
> but not Python 2.5).
> http://sourceforge.net/project/showfiles.php?group_id=78018
> 
> Do you have a specific reason for using Python 2.5? The simple
> answer to getting win32api on Python on 64 bit Vista would seem
> to be to use Python 2.6, and then use the above installer.
> 
> You said you'd already installed rpy2, so I guess you compiled
> this yourself from source for Vista as (as far as I know), there
> are no 64bit installers for rpy2 (or rpy1).
> 
> Laurent - should the rpy2 setup.py check to make sure
> win32api is installed? It was useful but not essential with rpy1.

It could (through a "require" in the call to "setup()").

In theory, this is the same with rpy2. The import will not be made if 
R_HOME is defined:

# --- from rpy/rinterface/__init__.py ---

if len(R_HOME) == 0:
     if sys.platform == 'win32':
         try:
             import win32api
             import win32con
             hkey = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE,
                                          "Software\\R-core\\R",
                                          0, win32con.KEY_QUERY_VALUE )
             R_HOME = win32api.RegQueryValueEx(hkey, "InstallPath")[0]
             win32api.RegCloseKey( hkey )
         except:
             raise RuntimeError(
                 "Unable to determine R version from the registery." +\
                 "Calling the command 'R RHOME' does not return 
anything.\n" +\
                     "This might be because R.exe is nowhere in your Path.")



I will likely prefer wrapping the import statement in a try/except 
provide a more self-explicit error message upon ImportError.



L.

> Peter
> 
> ------------------------------------------------------------------------------
> Enter the BlackBerry Developer Challenge  
> This is your chance to win up to $100,000 in prizes! For a limited time, 
> vendors submitting new applications to BlackBerry App World(TM) will have
> the opportunity to enter the BlackBerry Developer Challenge. See full prize  
> details at: http://p.sf.net/sfu/Challenge
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to