On 9/26/06, George Nurser <[EMAIL PROTECTED]> wrote: > I'm running Python 2.3.5 with recent SVN f2py. > > Suppose I import an extension I have built with f2py. Then, if I edit > the fortran and recompile the extension, I cannot use reload to use > the modified version within the same Python session. > > I believe this is an problem with Python, that reload doesn't work > with externally compiled extensions.
As far as I know, you are correct. > Is this something that can be changed in future versions of Python, or > is it an inherent problem? For editing and recompiling within an > ipython session is quite a good way of getting the fortran code to > work, leaving aside any problems in doing the f2py interfacing. Unfortunately due to this limitation, I just restart ipython when I need to reload extension code. I'd be thrilled to know if there is any easy workaround. It's worth noting that weave is in this regard extremly ipython-friendly: since the name of the extension it loads is a hash of the source, /any/ change to the source results in a newly named extension being built and loaded. So while you get a bit of memory bloat by keeping the old, unused extensions around, the net interactive effect is that 'reloading works' for weave-generated code. One more reason why I think weave is the best thing since toasted bagels. Cheers, f ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion