Improve this article..
Python is general purpose programming language[blends procedural+functional+object oriented functionality] in scripting mode. It has efficient high-level data structures, Powerful flexible string handling and a simple but effective approach to object-oriented programming. Python's elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.This pseudo-code nature of Python is one of its greatest strengths. It allows you to concentrate on the solution to the problem rather than the language itself. Python has an extraordinarily simple syntax.
Pep8 is a style guide which gives the coding convention for code comprising the standard library in the main Python distribution
Python is an experiment in how much freedom programmers need:
Too much freedom and nobody can read another's code;
Too little and expressiveness is endangered.
- Guido van Rossum
What's the historical context in which Python was invented?
Python was written by Guido van Rossum at CWI in the Netherlands as a successor to the ABC programming language capable of exception handling and interfacing with the Amoeba operating system. It was not possible to extend ABC Programming language and it would be foolish to write a Amoeba Specific language. Few features were conceived in the late 1980s and implemented started in 1990. Further it was posted on USENET in 1991.
What's so attractive about Python?
- Python can be easy to pick up whether you're a first time programmer or you're experienced with other languages
- Python allows to write the same program in much fewer lines of code
- Very clear readable syntax and keywords, with proper indentation being part of syntax checking
- Declaration of variables not required. object oriented and imperative programming can be mixed
- Easy to manipulate large data, linear algebra and matrix operations with pandas, numpy, scipy, sklearn etc.
- Lists, stacks, queues, dictionaries, you name it python has it. Moreover complex data structures like graphs can be easily implemented in python using a list of dictionaries
How do you classify Python as a language ?
Python is a programming language that lets you work more quickly and integrate your systems more effectively.
Python is a high-level, interpreted, interactive and object-oriented scripting language.
It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes.
Python is Interpreted: Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP.
Python is Interactive: You can actually sit at a Python prompt and interact with the interpreter directly to write your programs.
Python is Object-Oriented: Python supports Object-Oriented style or technique of programming that encapsulates code within objects.
Python is a Beginner's Language: Python is a great language for the beginner-level programmers and supports the development of a wide range of applications from simple text processing to WWW browsers to games.
Can Python be used in embedded systems?
Python can be used in embedded, small or minimal hardware devices, depending on how limiting the devices actually are.
Devices which could be considered as "embedded" by modern standards and which can run tuned versions of CPython include the following
MicroPython : MicroPython is a lean and efficient implementation of the Python 3programming language that includes a small subset of the Python standard library and is optimised to run on microcontrollers and in constrained environments. It aims to be as compatible with normal Python as possible to allow you to transfer code with ease from the desktop to a microcontroller or embedded system.
The pyboard is a compact and powerful electronics development board that runs MicroPython. It connects to your PC over USB, giving you a USB flash drive to save your Python scripts, and a serial Python prompt (a REPL) for instant programming. Works with Windows, Mac and Linux.
What are the main differences between Python2 and Python3?
- print is a statement
- tt has ASCII str() types and unicode() type , but no byte type
- two types of integers: C based integers (int) and Python long integer (long)
- range() returning a list of numbers and xrange() returning an object
- raising exceptions:raise IOError("file error") or raise IOError "file error"
- Return type of Division is int
- supports - rawinput() return as string and input() return as int
- print() is a built-in function
- all strs are Unicode (utf-8) strings, and 2 byte classes: byte and byte arrays
- all integers are python long integers so only one integer type (int)
- range() returning an object. and range() has new contains method which speeds up the lookup compared to python 2
- raising exceptions:raise IOError("file error")
- return type of Division is float
- input() wil return a string
Are there techniques to make my Python2 program run within a Python3 environment?
Automated Python 2 to 3 code translation - this python program will convert the python2 source code to python 3 source code. It will inside your python folder tools/scripts. basic arguments is list of files or directories to transform. if we want to write the changes in source file we can give -w
Is python can be embedded and used along with any other languages as python implementation?
yes, Python is a specification that can be implemented in many different languages. It compiles python source code into bytecode and execute on the Virtual Machine.Main purpose is to make it simple to write other language extensions for your python code.
implementaion virtual machine compatible language CPython CPython VM C Jython Java Virtual Machine Java libraries IronPython CLR .NET framework
Python Implementaion in Python[PyPy]
- A fast python implementation with a JIT compiler
- PyPy aims to be cross-platform, memory-light, and stackless-supportive.
- BeagleBone. 2017. "How to write and run a python program on the beagle bon" How to write and run a python program on the beagle bon. April 17. Accessed 2017-04-22
- Charles Marsh. 2017. "A Python Implementation Comparison" Python.Copyright 2010 - 2017 Toptal, LLC. Accessed 2017-04-22
- Embedded Python. 2017. "Help for Embedded projects using Python" Help for Embedded projects using Python.April 17. Accessed 2017-04-22
- Gumstix. 2009. "Installing-python-in-Gumstix" Installing-python-in-Gumstix. March 2009 . Accessed 2017-04-22
- Micropython. 2017. "Micropython" Micropython.April 17. Accessed 2017-04-22
- Pyboard. 2017. "Pyboard Reference Guide" Pyboard Reference Guide .April 17. Accessed 2017-04-22
- Python Docs. 2017. "Automated Python 2 to 3 code translation" Retrieved 2017-04-26
- Python History. 2017. "Python History" why-was-python-created-in-the-first-place. April 17. Accessed 2017-04-22.
- Python.org. 2017. "Python Documentation" Python 3.6.1 documentation. April 17. Accessed 2017-04-22.
- Rassberrypi program. 2017. "How to write and run a python program on the raspberry pi"How to write and run a python program on the raspberry pi. April 17. Accessed 2017-04-22
- Sebastian Raschka. 2016. "Key differences between Python 2.7.x and Python 3.x" key Differences updated Feb 2016
The Python programming language was conceived in the late 1980s
python implementation was started
python was uploaded to USENET
Python 2.0 was released
Python 3.0 was released
Python 2.7 will retire.
- Data Science