For more information about Python and other tutorial in this series, go to static page of this tutorial here: Python as A Hobby! [ ].
In my opinion, the best way to learn a programming language is to retype examples and run it yourself. In this tutorial, I will use this method. I will give examples to let us know the way we use Python.
In the last tutorial, I have provide some examples to let you warm up with Python. In this tutorial, there will be some more complicated examples.
1. How to programming and run Python .py files
We can use terminals to program Python as we did it before, but as the programs are more complicated, we need some better way, we need to use .py files.
Now open your editor (gedit, Vim, notepad, ... ) and type this code:
#!/usr/bin/env python
#my comment
import sys
print "Welcome to microtrix.blogspot.com Python world!"
sys.stdout.write("Have you been in Microtrix or Imhades.blogspot.com")
Now, save your works as
ADS
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Saturday, 9 July 2011
Python as A Hobby: Installation and Say Hello to Python
For more information about Python and other tutorial in this series, go to static page of this tutorial here: Python as A Hobby! [ ].
As mention earlier, you can get Python from python.org. Just go to python.org and download python installation file to you computer. Python has editions for different OS. Python for Linux, MacOS and Windows. Just get the one appropriate to you. In Windows and MacOS, thing goes easily. Just double click in to your downloaded file and Next, Next, Next, ...
For Windows users, after download file .msi or .exe from Python.org and install it as usually, you can run Python from DOS or from Python IDLE (IDLE is the default IDE for Python) .
In Linux, Ubuntu for example, you usually got
As mention earlier, you can get Python from python.org. Just go to python.org and download python installation file to you computer. Python has editions for different OS. Python for Linux, MacOS and Windows. Just get the one appropriate to you. In Windows and MacOS, thing goes easily. Just double click in to your downloaded file and Next, Next, Next, ...
For Windows users, after download file .msi or .exe from Python.org and install it as usually, you can run Python from DOS or from Python IDLE (IDLE is the default IDE for Python) .
In Linux, Ubuntu for example, you usually got
Tuesday, 5 July 2011
Python As A Hobby: What and Why Python?
Welcome to my programming tutorial: Python As A Hobby!
I. Introduction to Python.
1. What is Python?
Python is a programming language. We all know that programming language is the way human talk/communicate to/with devices. Devices may be computers, phones or any automatic machines. If you got a machine, there must be some ways to communicate with it and to tell this machine to do what you want (lift this, remove that, ...). In the other way, this machine also tell you about what it need (need gas, more water, ...). How they can do that. The answer is the programming languages.
Python was conceived in the late 1980s and its implementation was started in December 1989 by Guido van Rossum at CWI in the Netherlands as a successor to the ABC programming language (itself inspired by SETL)capable of exception handling and interfacing with the Amoeba operating system.
2. Why Python?
Every language has its own advantage. Some are fast, the others are easy to write (easy for coding),... I don't want to list all the advantages of Python because you can easily find it in the internet. I just want to point out the most important thing why I chose Python as my programming language.
"It is one of the most used programming language in Linux community."
As far as I know, there are alot of programmers in the open-source community used Python. Do you wonder why? When I first found this, I must give Python a try.
After give Python a try, I decided it is my programming language.
I don't want to convice you to give up your current language, I just believe that It is harmless for you to give it a try and after that, the choice is yours. No one can make this for you.
3. Where are the docs?
The most famous is that: Python Website.
Here you can download, install, and get the documents about Python.
The static link of this tutorial here: Python as a hobby!
1. What is Python?
Python is a programming language. We all know that programming language is the way human talk/communicate to/with devices. Devices may be computers, phones or any automatic machines. If you got a machine, there must be some ways to communicate with it and to tell this machine to do what you want (lift this, remove that, ...). In the other way, this machine also tell you about what it need (need gas, more water, ...). How they can do that. The answer is the programming languages.
Python was conceived in the late 1980s and its implementation was started in December 1989 by Guido van Rossum at CWI in the Netherlands as a successor to the ABC programming language (itself inspired by SETL)capable of exception handling and interfacing with the Amoeba operating system.
2. Why Python?
Every language has its own advantage. Some are fast, the others are easy to write (easy for coding),... I don't want to list all the advantages of Python because you can easily find it in the internet. I just want to point out the most important thing why I chose Python as my programming language.
"It is one of the most used programming language in Linux community."
As far as I know, there are alot of programmers in the open-source community used Python. Do you wonder why? When I first found this, I must give Python a try.
After give Python a try, I decided it is my programming language.
I don't want to convice you to give up your current language, I just believe that It is harmless for you to give it a try and after that, the choice is yours. No one can make this for you.
3. Where are the docs?
The most famous is that: Python Website.
Here you can download, install, and get the documents about Python.
The static link of this tutorial here: Python as a hobby!
Subscribe to:
Posts (Atom)
