Re: Turning off text generation inside PTL
David Binger <[email protected]>
| Newsgroups | gmane.comp.web.quixote.user |
|---|---|
| Message-ID | <[email protected]> |
On Aug 23, 2006, at 3:02 PM, Ernesto Adorio wrote:
> To clarify, here is a sample code (rpy is a Python interface to R):
>
> def Test [html] ():To clarify, here is a sample code (rpy is a
> Python interface to R):
>
> def Test [html] ():
> import rpy
> rpy.r.png(file=str("test.png")
> rpy.r.plot(rpy.r.norm(100))
> rpy.r.dev_off()
> # rest of code ...
>
Okay, I understand now.
I recommend putting the rpy stuff in a separate, non-template
function, either at the top level or as an inner function.
def Test [html] ():
import rpy
def rpy_stuff():
rpy.r.png(file=str("test.png")
rpy.r.plot(rpy.r.norm(100))
rpy.r.dev_off()
rpy_stuff()
# rest of code ...