Changeset 957


Ignore:
Timestamp:
21.03.2010 11:41:41 (2 years ago)
Author:
fhoffmann
Message:
 
Location:
QX/RPlain
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • QX/RPlain/.project

    r955 r957  
    66        </projects> 
    77        <buildSpec> 
     8                <buildCommand> 
     9                        <name>org.python.pydev.PyDevBuilder</name> 
     10                        <arguments> 
     11                        </arguments> 
     12                </buildCommand> 
    813        </buildSpec> 
    914        <natures> 
     15                <nature>org.python.pydev.pythonNature</nature> 
    1016        </natures> 
    1117</projectDescription> 
  • QX/RPlain/Rplain.py

    r954 r957  
    11__doc__ = """Rplain product module""" 
    2 __version__ = '0.1.1'  
     2__version__ = '0.1'  
    33 
    44import os 
     
    1414from rpy2.robjects import r 
    1515rpy2.robjects.__allow_access_to_unprotected_subobjects__ = 1 
     16import rpy2.rlike.container as rlc 
     17rlc.__allow_access_to_unprotected_subobjects__ = 1 
    1618 
    1719from zope.proxy import removeAllProxies  
     
    1921from plot import cachedImages, registerImage 
    2022from rstat import gdd 
     23from http_import import http_import 
    2124 
    2225 
     
    7073 
    7174    ############################################################################ 
     75    # rlc 
     76    ############################################################################ 
     77    def rlc(self): 
     78      return rpy2.rlike.container 
     79 
     80 
     81 
     82    ############################################################################ 
    7283    # cybertools: __call__ 
    7384    ############################################################################ 
     
    96107    ############################################################################ 
    97108    # cybertools: rplot 
     109    # @deprecated 
    98110    ############################################################################ 
    99111    def rplot(self, r , c, **kw): 
     
    103115        key = registerImage(fn) 
    104116        return '%s/R?image=%s.jpg' % (absoluteURL(context, request), key) 
     117 
     118    ############################################################################ 
     119    # cybertools: rfile 
     120    ############################################################################ 
     121    def rfile(self, r , c, **kw): 
     122        request = r 
     123        context = c 
     124        fn = os.tempnam(None, 'rfile')+'.prn' 
     125        data = http_import(kw['datasource']) 
     126        f = open(fn,'wb') 
     127        f.write(data) 
     128        f.close() 
     129        return fn 
    105130 
    106131    ############################################################################ 
Note: See TracChangeset for help on using the changeset viewer.