reloading modules

Discussion in 'Python' started by Joseph Krauze, Dec 3, 2003.

  1. Assume a main python file that does the following:

    from lib_mod import performAction
    def main():
    return performAction("myFile")

    Now, if I modify lib_mod.py and just try to reload main.py, lib_mod is not
    updated. I have searched online and came upon a few tinkers but nothing
    that seemed to be blessed by python.org. Is there a feature or an
    official modification that I'm missing?

    Otherwise, I'll probably always do a try on a reload at the top of main.py
    but that does not seem too robust to me.

    I am using 2.3.2 on CLI.

    Thanks,
    Joe
     
    Joseph Krauze, Dec 3, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Jewell

    Reloading nested modules

    Andy Jewell, Jul 13, 2003, in forum: Python
    Replies:
    2
    Views:
    303
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Jul 14, 2003
  2. OKB (not okblacke)

    Importing/reloading modules

    OKB (not okblacke), Sep 4, 2003, in forum: Python
    Replies:
    0
    Views:
    298
    OKB (not okblacke)
    Sep 4, 2003
  3. aurora
    Replies:
    2
    Views:
    288
    Bryan
    Oct 16, 2004
  4. Guest
    Replies:
    2
    Views:
    265
    Lee Harr
    Oct 15, 2004
  5. Peter Peyman Puk

    Importing v reloading modules modules

    Peter Peyman Puk, Mar 19, 2010, in forum: Python
    Replies:
    0
    Views:
    299
    Peter Peyman Puk
    Mar 19, 2010
Loading...

Share This Page