e.g. Cascade.py refers to images "Green_Apple" and sounds like "Coin_3". and Where are these located? Where will I find a list of all available images and sounds? And what is the recommended way & location to add my own images or sounds?
Thanks!
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.
e.g. Cascade.py refers to images "Green_Apple" and sounds like "Coin_3". and Where are these located? Where will I find a list of all available images and sounds? And what is the recommended way & location to add my own images or sounds?
Thanks!
The current "Move" interface shows fully unrolled folder hierarchy in the pop-up. It is actually quite hard to find your way around this.
Is there any way this could show just the top level folders, and unroll them only as needed e.g. tap-and-hold to open sub-folders, just tap to move to that target.
Thanks!
Apologies if this question turns out to not be Pythonista-specific, but I'm having a hard time understanding why my folders + imports break when I move things in Pythonista.
When I place foo.py somewhere in Pythonista (at the top level, or within a folder, or within a folder that contains an empty init.py, or a deeper folder) what are the rules for doing an import both (a) from foo.py, and (b) of foo.py.
Is site_packages special? Any others?
Do these rules depend on where the top-level main file being run is located?
Thanks!
I used shellista to clone gitview into a folder gitview at top level (no errors), then ran install_gitview (no errors), then ran gitui and get:
Line 18: no module named dropdown
Do I need to clone into a specific folder for it to work? I suspect this is operator error on my part.
Thanks!
[EDIT:] Please ignore this post!! I figured out a clean way to do this without any API change, just defining one Scene subclass and using composition from there on.
Touch is a more stateful interaction than many others. The touch API is touch_began(), touch_moved(), and touch_ended()
, and all three take a scene and a touch event, and expect nothing back. My touch interactions need to build up some state across these three, and this API forces me to save the state myself: imperative, increases subclassing of scene, and rules out a functional style game architecture.
If the API could accept the return value from each call, and provide it forward to the next one, I am free to code more functionally. e.g.
... touch_began(self, touch) -> my code returns A, can use self, touch
... touch_moved(self, touch, A) -> my code returns B1, can use A, self, touch
... touch_moved(self, touch, B1) -> my code returns B2, can use B1, self, touch
... touch_ended(self, touch, B2) -> my code does not return anything useful
Tracking the path could be cleanly functional if I wanted:
def touch_began(self, touch): return [touch.location]
def touch_moved(self, touch, p): return [touch.location] + p
def touch_ended(self, touch, p): do_whatever with accumulated path p
Perhaps Pythonista could include the return values from my code in the next call after checking arity of these methods? Or perhaps it could have a touch_began_f
, touch_moved_f
, and touch_ended_f
version that passed this extra information around? In either case I'm sure I am oversimplifying the impact :)
Love the tool!