Selecting previously unselected package geany-common. The following NEW packages will be installed:Ġ upgraded, 2 newly installed, 0 to remove and 134 not upgraded.Īfter this operation, 8,682 kB of additional disk space will be used. The following extra packages will be installed: Since we are starting out, I would recommend instead to install ~ $ sudo apt-get install geany For the experts, I would recommend something like scribes in graphical mode and vim in console mode (text). In order to do that, we will need an editor. Let's save our program that prints "Raspberry Pi!" in a file. py extension and that we can execute again and again. It's a good thing then that we can save our code in a file, whose name will end with the. But it might become burdensome to write the same code again and again. If our code is quite short, there are no issues with using the interactive mode. We will come back to functions later on (and we will learn that print is a strange animal, that should be written print(), but that's for another time). The word exit, followed by a pair of parenthesis, indicates that exit() is a function. To exit the python program, we must type the commant: exit() Type "help", "copyright", "credits" or "license" for more information. In an interactive way, from the command ~ $ python It is possible to use python in various ways or mode of operations. In this article, I will differentiate the python program from the language, by writing it in bold characters. It is included with the Raspberry Pi and with most Unix type systems (Solaris, OpenIndiana, Mac OS/X and the varieties of Linux and BSDs ). So, Python is a programming language, but it is also an executable program. Have you found a free ebook that should be mentionned here? If so, please leave a comment! If you are into games or young, or you want to help younger folks to learn Python, you might want to look at: In the not quite ebook, it is an online book category: Moving on to another editor, for many years, Dive into Python was another recommended book. How to Think Like a Computer Scientist: Think Python Among them is the classic text (or I should say the new edition of the classic text): These are also available in print and eBooks from OReilly, for a fee. the value to cost ratio is difficult to beat :) Considering how much you will pay for them. I won't hold back in recommending some books in this section. There are many textbooks available too, some are assigned reading material for Python classes in colleges and universities, worth your time to check them out. So you'll have to dig and see what book appeals to you, based on styles that vary from "Python for Kids", "Hello Python" and "Head on Python" to "Core Python Applications Programming" or even a "Python Essential Reference". One book that I like, you might hate, and vice versa, because we are all different. As I've taught some Python to others, and recommended some books based on their personality, I've noticed that almost everybody is different. If you live in a big city, it is a good idea to go to your local book store, and check out what books they have. Even checking out only hardcovers, you'll still end up with over 85 books! For example, on Amazon, you'll find over 1000 books on Python. If you are the visual type, check out also You can't get enough of documentation? Then There, you will discover regional user groups, documentation, downloads, mailing lists, a wiki and eventually, a Jobs section. But since you are reading this in English, will become your primary stop. If you spoke another language, such as Spanish, Portuguese, French, Italian or Russian, I would point you to several other websites, because for other languages, individuals tend to have more complete sites than the official one (or, I should say, more in tune with the culture). Welcome to our series of tutorials on the Python programming language, with a specific application to the Raspberry Pi.īefore we get too far, I want to provide you with a few basic links. Or perhaps, you do know that Python is a programming language. For everybody else who keep seeing references to Python in your research on the Raspberry Pi, and wondering why they keep talking about a snake, then this article will be perfect for you. Note: This is a translation of the popular basic guide to Python on the Raspberry Pi: Python sur RaspberryPi 01 (in french), adapted where it made sense.įor the experts, there's not much to see in this article.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |