omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Reloading a module

    Pythonista
    2
    4
    2688
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • briarfox
      briarfox last edited by

      I'm new to python and I may be going a bit crazy but how do you reload an imported module? I created a simple module that I import into my project. I then went back and made changes to the module and the script keep running the prior version before changes. The only way I was able to reload the updated module was to clear Pythonista from memory and reload it.

      1 Reply Last reply Reply Quote 0
      • briarfox
        briarfox last edited by

        It seems like Pythonista might have bugged out. After the restart files are updating and loading correctly.

        edit*
        It worked for a few minutes then it stopped updating the module when I made changes. I must be doing something wrong.

        1 Reply Last reply Reply Quote 0
        • ccc
          ccc last edited by

          A fair amount has been written on this topic. The first thread is probably the most instructive.

          http://omz-forums.appspot.com/pythonista/post/6016338648629248

          http://omz-forums.appspot.com/pythonista/post/5865279414337536

          http://omz-forums.appspot.com/pythonista/post/5901501423681536

          1 Reply Last reply Reply Quote 0
          • briarfox
            briarfox last edited by

            @ccc Thanks for the links. Solved the problem.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors