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.


    Changes takes no effect in runtime.

    Pythonista
    4
    5
    3387
    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.
    • Kluesi
      Kluesi last edited by

      Hi

      I am using Pythonista for iOS and I am new in the Python language. I wrote some scripts with "ui" and some with "scene" and I tested the compile modules (compile, compileall, py_compile). After that, changes in scripts did not effect in runtime. For example: I have a script "abc.py". And I compiled this script and I get an "abc.pyc". So every change in the "abc.py" did not effect in runtime. So I delete the "abc.pyc" but I have the same problem. Actually I have nor ".pyc" files but nothing happens.

      The exact problem is that I have a Python Script with an UI. If I press a button I start another Script with a scene module. If I change something in the script with the scene module I see no effect while running the App. Meanwhile I delete the complete content of my draw procedure but nothing happens.

      Can anybody help me?

      Thanks Jens

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

        import abc ; reload(abc)

        1 Reply Last reply Reply Quote 1
        • Kluesi
          Kluesi last edited by

          Thats it. Thank you.

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

            @Kluesi @ccc Additionally, this should not be necessary in 2.0 (when it is released)

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

              By the way, you shouldn't name any real module abc, because there is also a standard Python module named abc, which can be used to create abstract base classes (or ABCs). By writing your own module named abc, you make the standard abc module very hard to load, and anything that uses import abc will import your module instead of the standard one.

              I understand that your file probably isn't called abc, but naming conflicts can still be an issue. In general when you write a module it's a good idea to check if another module with the same name exists, simply by running import thing in the Python prompt. To find out where that module is located, see thing.__file__.

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