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.
What is the loop for the scene module??? Why is the documentation so sparse????
-
Why is the documentation for the scene module so bad??? For example:
-
The Scene.size attribute makes no mention of being able to call on Scene.size.w to get the width, even though that’s used in the tutorial.
-
The run() function doesn’t say what it calls or what it does. It just says it “runs the given scene.” What does it mean to run a scene??? That’s not explained anywhere!
-
There is absolutely NO mention of what the loop is!!! The infinite loop is completely invisible! My program should be quitting immediately but some ghost is keeping it running!
And on and on... sorry but without significantly better documentation I’m not even gonna bother trying with this since nothing about it is even close to beginner friendly. It’s a total guessing game about what’s going on under the hood and what options you even have to work with in terms of manipulating scenes. Strongly recommend better documentation and a better tutorial.
-
-
- This is explained in general under "Overview" > "Geometry", and the exact attributes of all geometric types are listed under "Geometry Types". The
scene.Scene.size
docs never say that the attribute is ascene.Size
, but based on the attribute name it's not that hard to guess (and if you're unsure, you can confirm it by printing out the attribute). - Yes, under
scene.run
it's never explained exactly what running the scene does (although thescene.Scene
docs explain what options you have to display a scene, and listsscene.run
as one of them). The tutorial also tells you that you need to pass your scene toscene.run
to display it. So yes, the docs ofscene.run
could be improved, but it's far from "not explained anywhere". - This is literally explained in the
scene.run
docs: "By default, the scene'supdate()
method is called 60 times per second." UnderScene.update
it also says "Do not call this method directly; it is called exactly once per frame, so long as the scene is presented in a view and is not paused." Again, the docs could perhaps be improved, but there is not "absolutely NO mention" thatrun
creates a loop.
If you want to give feedback on the documentation, that's great, everyone benefits from that, but it would be really nice if you could do so in a way that isn't completely exaggerated. If you don't want to use
scene
, that's your choice of course, no one will stop you. - This is explained in general under "Overview" > "Geometry", and the exact attributes of all geometric types are listed under "Geometry Types". The
-
Documentation could be improved, no questions here.
Tips for a beginner (like me)?
-
Read the documentation twice. Many times this won't solve your doubts (I know it doesn't solve mine).
-
Check the Examples folder. I have learnt more than a few things reading them.
-
Look for answers here and make questions. Probably you will get an answer.
I have said in this forum that I would like that Ole wrote better documentation and would happily participate in a crowdfunding, if he organized it. I understand that writing good documentation requires time and time is money...
-
-
Hi, I agree with @runjaj and understand @ahp378 point of view. I would add:
- have in mind a practical problem to solve with Pythonista (a program to calculate something, or a graphical app with keys and text fields, or a game, ...)
- divide the practical problem in little problems (if possible)
- learn to solve the little problems (before independently that is easier and then by linking them together to recreate the main big problem of point 1) by:
a. searching for an existing piece of code that solves the little problem 'x' (a big database of Pythonista scripts is this by @tdamdouni). if the piece of code solves your problem ok, if not try to modify it by changing numerical values or easy parts (with an empirical approach, and if the piece of code is well commented, it is easier).
b. if you can't find existing pieces of code, starting to read documentation having in mind that it could be not updated or incomplete (but it is very big).
The best documentation could be in my opinion a big with easy to find/search feature database of common recipes/pieces of code for all Pythonista features (objc, scene, sound, location, console, etc...). The big database (the one by tdamdouni is an example) would be created and maintained by people with different curiosities and interests, in this way community could help itself about common pieces of code and without bothering the only person who maintains the Pythonista software and its big documentation (@omz).
Bye