omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. WTFruit
    3. Topics

    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.


    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 26
    • Best 5
    • Controversial 0
    • Groups 0

    Topics created by WTFruit

    • WTFruit

      Instead of a question, I'd like to share my accomplishments
      Pythonista • • WTFruit

      10
      0
      Votes
      10
      Posts
      6475
      Views

      Webmaster4o

      Ok. Well for the rest: as you explore, you track the distance along edges that it took you to get to each node. For example, if we take a path to get to a node along an edge with distance 4 and an edge with distance 3, the distance would be 7. This is necessary to find the shortest path. So imagine we have two paths to a node. Along one path, the distance is 7. But say we come back later and the distance is only 4! If this is the case, we change the node's distance to 4 and readjust the parents. In this way, when we trace a path back, that path is always the shortest, because we explore all possible paths and always pick the shortest one we find.

    • WTFruit

      Emulator/on device, how to get rid of debugging console after closing app?
      Pythonista • • WTFruit

      6
      0
      Votes
      6
      Posts
      3667
      Views

      dgelessus

      It might be useful to write a top-level except BaseException as exc handler that logs the exception, and then crash on purpose with os.abort(). That's probably more user-friendly than showing the debug console with a traceback, or silently logging the exception and pretending that nothing happened.

    • WTFruit

      Woo woo, question number 4! Seems simple.... change a node's (shapenode primarily) size after the fact?
      Pythonista • • WTFruit

      20
      0
      Votes
      20
      Posts
      10841
      Views

      ccc

      https://atom.io is a wonderful editor that I highly recommend. If you add the package linter-flake8, Atom will catch indentation issues and a multitude of other errors in your Python code in realtime as you type! I find that it consistently saves me several run-and-crash cycles on Mac, Windoze, and Linux. See the video at https://atom.io/packages/linter-flake8

    • WTFruit

      I thought about spacing my questions, but... scene.present_modal_scene issues
      Pythonista • • WTFruit

      7
      0
      Votes
      7
      Posts
      3778
      Views

      WTFruit

      @omz (or anyone else reading this)

      I finally got an implementation of the modal_scene working (took me long enough), it brings up the modal scene and everything. But it still gives me the same initial error at the moment that the modal scene is called. Is there anything I can do about that?

      Thank you for the scene-change code by the way, it works like a charm. Although I was curious why this works:

      self.menu = Scene2() self.present_modal_scene(self.menu)

      But not this:

      self.present_modal_scene(Scene2())

      I guess I'm misunderstanding the use of self.menu, I assumed it was basically a pointer, a stand-in for the other phrasing of the code (Scene2()).

    • WTFruit

      Is there a way to check whether an animation has ended?
      Pythonista • • WTFruit

      8
      0
      Votes
      8
      Posts
      4303
      Views

      WTFruit

      @omz

      Huh okay! Very small detail that I would have missed but makes sense now. Thanks :)

    • WTFruit

      I'm just trying to learn (re-learn) and I wan't to create a 2-dimensional grid of objects...
      Pythonista • • WTFruit

      7
      1
      Votes
      7
      Posts
      3483
      Views

      WTFruit

      @omz

      You have been more than generous with your time and knowledge and this brief conversation has seriously helped me more than the countless hours of reading and searching that I've been doing so far. After the stuff you just clarified and explained, I've already been able to display the grid in a scene and hook it up to a touch event to re-generate the grid. I could ask more questions but I think they should wait awhile while I poke around more :).

      Thanks,
      Nate