from __future__ import ... within an RExec?

Paul Rubin phr-n2002b at
Sun Aug 18 05:58:28 CEST 2002

Erik Max Francis <max at> writes:
> >>> x.r_exec('from __future__ import division')
> >>> x.r_eval('1/2')
> 0
> but no such luck.  Trying to use the .r_import method directly also
> didn't come up with anything.  I'm not getting an ImportError, just
> nothing's happening.  Is there any way to do this within a RExec?

Use x.r_eval(1.0/2.0).

More information about the Python-list mailing list