Re: Re-running script from Tk shell



On Apr 30, 9:51 am, gtb <goodTweetieB...@xxxxxxxxxxx> wrote:
I am testing a simple script by running it in the Tk shell. It imports
a class from another module. I edit and save the file from which I
import. When I want to re-run I delete the Tk window and run the
module from the Edit window (F5 - Run Module). The script that does
the importing does not see the changes to the imported class, even if
I delete the compiled files. For it to see the changes I must close
all the edit windows and re-open an Idle edit.

Perhaps I need to de-import the class, but I have not found a method
in the tutorial or the reference (yet).

Thanks

You probably need to reload() the imported module. Check out the
following thread: http://www.python.org/search/hypermail/python-1993/0342.html

Hopefully that's what you meant anyway.

Mike

.



Relevant Pages

  • Re: [9fans] Using the Acme Editor
    ... file in a window above the one you are editing. ... middle clicking the Edit command ... Lisp is a very editor friendly language. ...
    (comp.os.plan9)
  • Re: Aufbau von mit NAME erzeugter Objekte
    ... Die WINDOW Klausel bei ... Um auf die EDIT bezogenen Ereignisse zu reagieren, ... EDIT WINDOW PreviewWin NAME oTest ... Browse ausgeführt wird.. ...
    (microsoft.public.de.fox)
  • Re: pointer to a mfc form
    ... > edit box on a mfc formview class from my generic class. ... One of the first things the default OnDraw does (in fact, ... put an edit control in the dialog and associated it with a CString ... Now, if you compile and run this, it'll create a window with an edit ...
    (microsoft.public.vc.language)
  • Re: Windows & Dialog Stencil
    ... the Open at the bottom of the Edit menu is to ... stencil, you need to open the stencil and then right click the ... Then I can proceed to the "Show ShapeSheet" window and edit each ... User.Active is a boolean cell that is ...
    (microsoft.public.visio.general)
  • Re: Editing ListView Fields
    ... ListView. ... EDIT window over the field. ... controls' which is what the EDIT control is classified as. ...
    (microsoft.public.win32.programmer.ui)