About Python

Posted on Thu 19 November 2015 in Python


About Python

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn't catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.

Get into GNU/Linux first

GNU/Linux is an community built operating system that gives a very good platform for developement. Any one can create, deploy and produce with a help of GNU/Linux. There are various distributions of GNU/Linux that makes us feel comfort with what we need. People who are all working with testing can have Kali Linux, people working on Bio Tech. can have Bodhi Linux, Students can have Boss Linux etc. Actually why I am saying this?.. Yeah! Get rid of proprietaries. Get into the platform providing you a full freedom and then you can strat develope whatever you want. Yup! finally Iam going to take you to the tour of python (Basics) through GNU/Linux and Dear proprietary users, try to get into GNU/Linux! else bye bye.

Setting up Python in GNU/Linux

Well guys, let us set up Python in GNU/Linux. Most cases, Python will installed on your GNU/Linux system by default. In speciall cases on setting up of virtual environment which produce a virtual environment where you can work with different versions of Python and installing pip through which you can install all the necessary python libraries, just visit Here!.

Have you visited there! Let us move next.

Installing Ipython

As python is an interpreted language, here I show you Ipython an interpretor for python where you can interpret the python statements and you can get the instant output there.

To install Ipython in your system

  • sudo apt-get install ipython (ubuntu users)
  • sudo dnf install ipython (fedora users)

To run Ipython, Just type ipython in terminal and then you can play with the python statements there.

Run a Python File

The python file will have the extension .py. To run a python file, in terminal, type python filename.py.