Getting Started
-
OK, so I have no experience of python and I have just installed Pythonista. The idea was to learn Python and explore writing apps for the iPad with it. I haveover 40 years programming experience in Assembler, Algol, C C# Java and Visual Basic.
I have to say that whilst Pythonista looked attractive as a way of programming on the iPad it is very poorly supported in the product with novice getting started help. Right now it seems rather opaque. Much of the documentation seems to be for Python on a workstation running Linux, Windows or OSX. When one it totally new to both the language and the development environment it is rather confusing.
I would like to find some tutorials that start at a real beginner level and take me through the IDE with a simple subset of Python. Perhaps starting with a simple ‘hello world’ form and then incrementally revealing the power of the ide at the same time as bringing in more Python language - moving quickly to reveal its own nature.
Pointers would be welcome.
-
@dumdum , I left out this excellent Resource. PyVideo.org. All the videos from the various Python conferences around the world. Including local developer groups. Eg, the list of videos from the PyCon 2017 in Portland Oregon. The videos were being posted during the conference. Anyway, its another great resource.
-
@Phuket2 - thank you for your detailed response. I will check out the references you have provided. I am slowly gaining confidence in simple, non GUI, oo codewriting. I guess now it is a matter of learning what is available for GUI design and even perhaps, if it is possible, creating a stand-alone shareable app and more ambitiously web apps that might help some research collaborators.
-
@dumdum there're numerous resources around the internet and it doesn't make sense to copy & paste them here. Google is your friend.
I can give you one recommendation only - think about some mini project / app / script you want, not a big one, just something smaller. Then go and finish it, whatever it takes, ask, show what you have tried, people will help you. And then choose another mini project / app / script and start again.
It has no sense to spend time with reading lot of tutorials, watching videos, ... because only small portion will stay in your head. You have to immediately use, try, ... whatever you learned / read.
If you're out of ideas for mini project / app / script, go and solve tasks from:
- http://www.practicepython.org/
- https://www.codewars.com/?language=python
- Google for python code challenge
In these challenges, you can find very simple tasks to finish and then more challenging ones.
-
@zrzka thank you - good stuff. You are absolutely right that it is time to write a simple program. That is what I have begun doing. Watch this space as they say.
-
@zrzka Thanks zrzka for the links, they also help me! And I'm agree with you about how to learn a new programming language. Often it is useful for me:
- to think about any simple task to be coded (any kind of tasks that are possible with Python/idevice in order to perform some automatic operations);
- to try coding the simple task with human-pseudo-code (to have, at least, a structure of the code I want);
- to try translating the human-pseudo-code in Python code (using stackoverflow or google for pieces of code that someone else has already written and shared freely);
- to test often my code to be sure that all little pieces of code work as I want (it is not always simple to do if the main code calls several modules, functions, ...).
To learn a new programming language is frustrating for me if I have not some little useful goals that could make the managment of my phone easier. For example, now I'm trying to learn how to write a python code in Pythonista that reads all old events in the iphone built-in calendar app, moves them to a specific day and creates a backup txt file with all old events, in this way my calendar app is always clean and every day I can see the events that I still have to complete.
Regards
-
@zrzka , thanks also for the links. I will spend some time at the practicepython.org.
-
I’m a retired programmer with 50+ years experience. Python is just another language, and I mastered the syntax within a day. But the libraries are where the action is. I want to use Pythonista to teach kids how to write games, and the Scene class is documented in a way that only its implementors can understand. The problem is that there is an underlying structure that can only be inferred from the documentation, which is sparse. I somehow have to understand this well enough to organize a tutorial for 10-to-12-year-olds. And I can’t get the structure in my head from the sparse documentation. Any suggestions on how to make sense of 2D graphics?
-
Agree the docs can be a bit confusing on scene, partly because there are sort of two approaches supported : Sprite/Node based scenes, and render loop based.
In node based scenes , you basicslly tell the game engine your intent, via actions, and it handles the animation. In render loop, you draw the complete game state every cycle.
A good way to understand how it all works is probably by looking at fully worked examples, and taking them apart, etc.
Here is probably the most complete (and actually fun) game that has been posted publically.
https://github.com/chriswilson1982/BlackAndWhiteThere are several other community developed games here
https://github.com/Pythonista-Tools/Pythonista-Tools/blob/master/Games.md
This is a god example of a Node based game, complete with effects, etcMost of the other examples are the old style render loop, which are maybe easier to understand conceptually, since there is very little magic going on behind the scene.
-
@dumdum, I am not only new to Pythonista/Python, but to programming all together and am in my late 40's. As already pointed out, Pythonista is not really advertised as a tutorial so much as a scripting environment. That said, I very much appreciate what Pythonista has to offer.
However; in terms of learning Python, I have found the following website to be the most valuable tool thus far:
http://interactivepython.org/runestone/static/thinkcspy/index.htmlIn conjunction with that website, I use Thonny on my laptop as a simple yet very useful IDE to play around in.
http://thonny.orgSomething to take note of. All of the IDE's I tried seemed to have an issue running different commands (including the one native to Python). The only issue I've come across so far with the Thonny IDE was that it would freeze when running script that used 'exitonclick'.
I hope this provides a bit of what you're looking for.