I am using IronPython as a math parser with the DLR in my Silverlight project: it works, but computes incorrect results in cases involving division, as it uses integer instead of floating point math at times (so 4/3 returns 1). Google suggests adding from __future__ import division
to the python script, but doing so throws an exception when I try to run it.
Are __future__
statements supported at all in IronPython? What can I do to make them work?
You'll have to make sure that
__future__.py
is available for import. I'm not sure how to do that for Silverlight, though.