[IronPython] Re: reload or workaround

Michael Spencer mahs at telcopartners.com
Wed Apr 27 00:42:30 CEST 2005


Jim Hugunin wrote:
> Michael Spencer wrote:
> 
>>Since reload is not available yet, what is the best workaround for re-
>>compiling
>>changed source for imported modules?
> 
> 
> Execfile is a good option for many situations and was implemented to
> make sure we had at least a partial reload story. 

Thanks, that *is* a better work-around.  Too bad execfile doesn't take a globals 
argument - then we'd have reload for free.  And exec barfs on exec "import ~", 
so that isn't an option either for now.

  Until we get great
> IDE support, one of my favorite ways of driving Python is with emacs
> mode.  I'll edit my script in one buffer and then use the emacs command
> to execfile that code in the open interactive buffer.  This works great
> when you're working on a single module at a time.  Does this help?
> 
That's very much the set-up I use with CPython, albeit with a wxPython-based 
shell. But I think you'll be able to make reload in less time than it would take 
me to learn emacs ;-)

> A simple version of reload shouldn't be that much work.  I don't know
> why it fell off the radar for this long.  We'll get that running in the
> next 1-2 weeks for 0.7.4.
> 
> Thanks - Jim 
I'll look forward to it.

Cheers

Michael




More information about the Ironpython-users mailing list