Wednesday, 6 January 2016

Python Development Process

Python Development Process:

There is no distinction between the development and execution environments. In other words, the compiler is always right there at runtime and is part of the system that runs the program. All we have in Python is runtime. There is no initial compile-time phase at all and everything happens as the program is running.

This even includes operation such as the creation of functions and classes and the linking of modules. Such events occur before execution in more static languages, but in Python, they happen as programs execute.

This adds a more dynamic flavor to the Python - it is often very convenient for Python programs to construct and execute other Python programs at runtime. The eval and exec built-ins, for example, accept and run strings containing Python program code.

This structure is why Python lends itself to customization. Because Python code can be changed on the fly, users can modify the Python parts of a system onsite without needing to compile the entire system's code.

Running Python Programs

Running Python Programs:

Python Interpreter

The Python code we write must always be run by the Interpreter.
To enable it, we must install a Python interpreter on our machine.
When the Python package is installed on our machine, it generates number of components:


Python Execution

Make a file with the following line.

print("Hello world!")

The extension py is not required but for consistency, Python file usually has that extension.

If we run the file on a command prompt window:

C:\temp > python 

Hello World

We typed the code into text file, and we run the file through the interpreter. Simple!
But let's think about the runtime structure of Python.

Python introduction and need for it as C++ developer.

Introduction to Python:

As a C++ developer why we need Python?

For example we have developed an application to create some data in the farm of files. We have used our application and generated so many number of files after that we found that there is some replacement or some modification is required in those files. At that time we have only one option that we need to modify our application and need to generate new build and finally we have to run the application. Again need to generate all the files. Such a time taking process.

To overcome these type of problems and to automate some small tasks in the system, we prefer python.

Basically, when I need to code something and the language doesn’t matter, I use Python.

What is Python?

Python is a general purpose programming language created in the late 1980s, and named after Monty Python, that’s used by thousands of people to do things from testing microchips at Intel, to powering Instagram, to building video games with the “PyGame” library. It’s small, very closely resembles the English language, and has hundreds of existing third-party libraries.