no more reload() in py3k



Hi all, this is possibly a python-dev question but I'll ask here
first.

Situation:
I work on an application that takes 10-20 seconds to startup plus
opening a document. To avoid having to restart the entire application
each edit-debug cycle we rely heavily on the reload command. A typical
method in our command dispatcher looks like this:

def edit_something(self, something):
reload(meshDialogModule)
dlg = meshDialogModule.MeshDialog(self.app, something)
dlg.run()

when the application is built into an exe the reload function is
redefined to lambda x: x.
The advantage of this is that every time I open a dialog my latest
changes are applied and the debug cycle is: edit code -> open dialog -

test -> close dialog -> edit code, which is many times faster than
restarting the app and opening a project each time.

Question:
I am told to use the exec() statement instead. I don't see how I can
use exec to reload a module.

Cheers
Tim

.



Relevant Pages

  • Re: Reading the clientData
    ... Javascript than if you do it on a local file. ... immediately after opening the file. ... called at end of timeout and in that function access the ... >i must reload the JS code, ...
    (microsoft.public.windowsmedia.server)
  • Re: open command
    ... which one hangs. ... you're observing a deadlock in [exec] on Windows multi- ... runs on one embedded version that is where I write my tcl code, ... Somone was opening TK windows using it and he ...
    (comp.lang.tcl)
  • Re: problem regarding "exec" statement
    ... opening up a blank document instead of the actual one. ... exec cmd /c start $file? ... tendency to stall for a while before opening the file ... should be fine if $file doesn't contain any other strange chars (such ...
    (comp.lang.tcl)
  • Microsoft Office 2000 Disc
    ... My computer recently crashed and I had to reload my ... Upon opening my Microsoft Office 2000 case I ... discovered that Disc 2 was broken in half. ...
    (microsoft.public.office.misc)
  • Windows Media Player wont open
    ... >I've tried playing videos and I've tried opening it from ... from add/remove then reload it from ...
    (microsoft.public.windowsxp.perform_maintain)