Closed
Description
Original ticket http://projects.scipy.org/numpy/ticket/1653 on 2010-10-29 by @mforbes, assigned to @pv.
Including statements like "from future import division" in the plot_pre_code fails because these are module specific.
One could fix this by changing line 464 of plot_directive.py to something like:
futures = [l for l in setup.config.plot_pre_code
if "from __future__ import" in l]
exec "\n".join(futures + [code]) in ns
This could probably be made slightly more robust. There may be another way of doing this, but I cannot see how right now.
Michael.