Refreshing imported modules

Discussion in 'Python' started by noagbodjivictor, May 2, 2007.

  1. I have the python interperter opened while editing a module. The
    problem is that when I make changes, the module is not refreshed
    whenever I import it again. I have to re-launch the interpreter, is
    there a way to shortcut this?
     
    noagbodjivictor, May 2, 2007
    #1
    1. Advertisements

  2. noagbodjivictor

    sykora Guest

    I believe you can use the 'reload' command. ie

    First import your module :

    If you want to refresh the module after having changed it,
    That should work. However, any variables you have declared which arise
    from classes within your module must be redeclared.
     
    sykora, May 3, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.