Not updating imported module



  • I'm importing a module from a script. If I modify this module and run the script again (reloading), it keeps using the previous version. It doesn't updates the new changes.
    This doesn't happen with the same script and module in the same place running from Textmate.
    I guess it's a bug... Sometimes it's not easy to decide which Forum post to : )
    Thanks!


  • admin

    python creates .pyc files on the fly during runtime only if the compiled version is not existing.

    You can force to reload a module by:

    import myModule
    reload(myModule)
    

    good luck