Monday, April 13, 2015

Install Python 3 On Mac OS X - Getting Started - Python Tutorial

Install Python 3 On Mac OS XBefore we can get started with our Python tutorials we need to install Python 3 on Mac OS X. Python comes as a software package available for the Mac operating system and installation is pretty straight forward. Python 2.7 is already on your Mac but in this tutorial series, we are focusing on Python 3 since this version of Python is not installed we need to install it on the Mac. Follow this tutorial step by step when setting up Python 3.


Find Python 2 First


I would like you to find Python 2 first.  We are only doing that to show you how to access Python 2 in your system. You will do almost the same steps to access version 3.  You may also want to find out how access version 2.7 in future to work in this version. Do not delete the default version on your computer this will cause all types of problems since some of the Mac’s default software uses version 2.7 to run applications.


Step 1 – Access Your Terminal


We will be doing a lot work in terminal throughout this tutorial series so this is an important step. To access the terminal on a Mac you have several options.


Via Spotlight – We can find the terminal via the spotlight option on the Mac to do this push command + space bar at the same time or go to top of your screen and click on magnifying glass.


mac spot light
Mac Spotlight

Now that we have the spotlight open now we simply type in “terminal”.


spotlight with terminal


Simply hit enter and your terminal will open.


Mac Terminal


There you go there is your terminal.  Your terminal may seem sort of different. That is all right as long as we got it open.


Via the finder – Now opening the terminal via the finder takes longer, but it’s good to know where it is located in your finder. Open finder > applications > Utilities > Terminal. There you go the terminal is open but easier to open via spotlight using command + space bar.


Optional Add Terminal to Dock – I add the terminal to the dock since I use it everyday this is optional for you, but if you are going to follow a long in this tutorial I suggest adding the terminal to your dock. To add the terminal to your dock right click terminal in the dock then go to options > click keep in dock.


Step 2 – Access Python 2


Now that we have the terminal open let’s access Python 2 we do this by simple typing “python” into the terminal and pressing the return key.


#Your layout may look different especially before the dollar sign 

Thomass-MBP:~ Tommy$

#Now enter "python"

Thomass-MBP:~ Tommy$ python

#Hit enter

#Now you should see something similar to this
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

#If you see this then you have accessed Python Interpreter

If you did not get your Python 2 interpreter open then please let us know via the comments below or answers section in the main menu.  We can look into why you were not able to access your Python 2 interpreter. Now that you were able to access the Python 2 interpreter lets exit the interpreter by typing quit() or exit() or control + d. When you exit your terminal should not show >>> that is how you know you have properly exited the interpreter.


Install Python 3 On Mac OS X


We can now install Python 3 on Mac OS X.  Please follow the steps exactly, so we do not have any issues installing Python 3.


Step 1 – Visit http://python.org this is where we can download the Python 3 software.


Step 1 - visit http://python.org
Step 1 – Visit http://python.org

 


 Step 2 – Hover over downloads on Python.org home page.


Hover over downloads on Python.org
Hover over downloads on Python.org

Step 3 – Click on Python 3.4.2 button and Python 3 will download


Click on Python 3.4.2 and Python 3 will Download
Click on Python 3.4.2 and Python 3 will Download

Step 4 – Just open the download where you have download the software. Yours maybe different than mine, but most likely in your downloads file. We will refer to the screenshot below and press continue.


Open Python Download
Open Python Download

 


Step 5 – Now we are on a screen that says important information. You can read this if you like if not then go ahead and press continue.


Important Information Page
Important Information Page

 


Step 6 – Now we are on a screen that says the software License Agreement. Once again you can read this if you like and when done click continue. Then a screen will pop up click agree if you agree with the Software License Agreement.Software License Agreement


Software License Agreement


 


Agree to Software License Agreement
Agree to Software License Agreement

 


Step 7 – Next page we come to is install location page. Do not change the location unless you understand what you are doing. Just press install to install in the current location.


Install Location
Install Location

Step 8 – When you press install a window will popup and ask you to enter your password please do so.


Enter Password
Enter Password

Step 9 – Python will start the install process.


Python will Start Install Process
Python will Start Install Process

 


Step 10 – When installation is complete press close button.


Installation Complete Press Close
Installation Complete Press Close

 


Now Python is installed on your computer. We will now check the installation to ensure that it installed properly. To check the installation of Python follow the next couple of steps.


Check Python 3 Installation


Step 1 – Open the terminal using the steps in the beginning of this tutorial.


Open Terminal
Open Terminal

Step 2 – Now we type “python3″ to open our Python 3 Interpreter and press Return.


Type "python3" Press Return
Type “python3″ Press Return

 


Step 3 – We should see something very similar to the following screenshot.


You Should See The Following
You Should See The Following

 


If you see something very similar to the above screenshot especially Python 3.4.X. X being the latest version so this may change just a bit. If you see this, then you have successfully complete the Install Python 3 on Mac OS X tutorial. If you did not get this or got some errors please leave a comment below or in the answers section of this website so we can help you get Python 3 on your Mac.


The install Python 3 on Mac OS X process is very simple but if your operating system is configured differently than we could run into some issues. If you have any questions about the installation process, please ask we are here to help you a long.



Python Software Foundation - Python Tutorial

Python Software FoundationThe Python Software Foundation is the non-profit organization in charge of developing Python. The Python Software Foundation was established in 2001 to support the Python Programming Language. You can visit the Python website http://python.org to get more information on the Python Software Foundation.



Sunday, April 12, 2015

Guido Van Rossum - Python Tutorial

guido van rossumGuido Van Rossum is a dutch computer programmer who developed the Python programming language. Mr. Van Rossum now oversees the development of Python.  He has been employed by Google where he spent most of time developing Python.  He now works for Dropbox.



Python Programming Language - Python Tutorial

Python Programming LanguagePython Programming Language is a very powerful user friendly general purpose programming language. The development of Python had one goal in mind making it user friendly and they did this by designing the language to be easy to learn, read and use. Python was originally developed by a man named Guido Van Rossum who created Python as a hobby. You can get more information about the Python Programming language by visiting Python’s website at http://python.org



Saturday, April 11, 2015

History Of The Python Programming Language - Getting Started - Python Tutorial

History Of The Python Programming LanguageHistory Of The Python Programming Language


Python came about when a man named Guido Van Rossum was looking for a hobby during Christmas break back in 1989.  He just wanted to write an interpreter for a scripting language which he has been thinking about for sometime. Over that break, he creates a scripting language which he later named it Python after the Monty Python’s Flying Circus which he was a large fan of.


First Public Release


Van Rossum first released Python in 1991 for public to use. The Python language did not really can ground with the public till a forum was created to discuss the language in 1994.


in 1994


Version 1.0 was released in 1994 right when Python started to gain traction with some followers. One of the main focuses of this release was making the language easy to use.


in 2000


Version 2.0 was released in 2000 giving the language the ability to garbage collect which is a form automatic memory management.


In 2001


Python formed a non-profit organization called Python Software Foundation and version 2.1 was released.


in 2008 


Python 3 was released to the public.  Python 3 was designed to reduce the multiple ways to do something and try to limit it to only one correct way to code.  This this idea it has made Python even easier to learn and write.


Conclusion


This was a just a brief overview of the History Of The Python Programming Language there was obviously a lot more going on over the years.  My main goal here was to just to show you how the language came about and it progressed through the years.


We will be focusing on Python 3 in our tutorials.



Why Should You Learn Python - Getting Started - Python Tutorial

Why Should You Learn PythonWhy Should You Learn Python


Why should you learn Python? Well the easiest answer to that question is because it is absolutely amazing! That may be not good enough answer to persuade you to learn Python. So in this tutorial we are going to try to convince you to learn Python over other programming languages. There is no simple explanation why over a million programmers have chosen to use Python as their go to programming language in their projects. Below you will find several reasons why Python has been chosen time and time again.


Powerful


Why should you learn Python? I asked this question again under the powerful headline because this will show you why Python is chosen over and over.  Python is powerful enough for Google and NASA.  That is right Python is used by two of biggest technology companies in world. How about some light reading about why NASA has chosen Python https://www.python.org/about/success/usa/ Conviced yet? Ok how about some more reasons check these out https://www.python.org/about/success/


Readable


The Python language is easy to read when compared to other languages. The Python code can even be read by people who never saw code before. Reading Python code is like reading a english language.  If you can read than you can read the code. Once you’re able to read the code learning how to write the code is very simple with some practice. Practice brings on memorization of how to write the code and limits the need for reference manuals and hours of research like some other languages require.  Python has a pretty simple syntax which is why it is so simple to read.


Reusable


The code you have written or other, programmers have written can be reused in your programs with ease. Python was designed so you do not have to repeat yourself(rewrite the code). Python supports object oriented and functional programming which gives us the ability to type the code once and call it when needed.


Productivity


It takes less code to write programs in Python than some other popular programming languages out there. The less code you need to write to make things happen in your software means the more time you have to spend doing other things you love.


Packages


Python offers software packages which are easy imported into your software so you do not have to write code that has been already written by your fellow Python programmers. This again revisits the concept do not repeat yourself which means less work for us. As of today, there are 55,000 packages available for you to use in your programs. If you would want to check out the Python Package repository visit https://pypi.python.org/pypi. We will show how to import packages in our tutorials.


Support


The Python programming language has a lot of support across the internet. If you Google a Python question then you will get hundreds of answers to your question.  A word of warning though make sure you find a quality source to constantly refer to like our site.  Some sources across the web could confuse you more than help you. When I have a question I always turn to the Python documentation at https://www.python.org/ this is the main source for the Python Programming language.


It is Just Flat Out Fun To Work With


I have worked with PHP, Ruby, C and Python, but Python is by far my favorite. It has a great deal to do with the ease of use and the support that the language has which keeps me so interested in Python. I quickly noticed how much more I liked Python over other languages after a couple of days of working with the language.  I am not bashing any other languages I just enjoy this language more than the others.  You may disagree with me and that is fine everyone has their preference.


I hope we answered your question why should you learn Python? This language seems to have a lot of great aspects but it also has only one downside that I have noticed and that is speed as computers get faster it is tougher to see the speed issue so I will not discuss that anymore. If you have any questions please leave us a comment below so we can help you out.


 


 



Friday, April 10, 2015

Getting Started With Python - Chapter 1 - Python Tutorial

Getting Started With PythonGetting Started with Python


This is an introduction to chapter 1 of our Python Tutorials.  Each section of our Python tutorials are broken down into chapters for better navigation and awareness of your progression throughout our tutorial series.


In chapter 1 we are going to give you a background on the Python Programming Language. We will look at the history of the language, discover why you should learn the language and even talk about more resources to help your learn how to program with this amazing programming language.


Chapter 1 Contents


  1. Why Should You Learn Python?

  2. History of The Python Programming Language

  3. Install Python 3 On Mac OS X 

  4. Install Python 3 Windows

  5. Mac OS X Terminal Commands

When you’ve completed getting started with Python move on to chapter 2 of our website to continue learning.