Wednesday, 6 January 2016

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.


Because of the above three reasons I advised python :)

Python with C++:

Python code can invoke C/C++ libraries and can be called from C/C++.
It can integrate with Java and .Net components, and it can communicate over frameworks such as COM. It also can interface with devices over serial ports, and can interact over networks with interfaces like SOAP, XML-RPC, and COBRA.

Python with Database Programming:

For general database, Python gives us interfaces to all RDBS - Sybase, Oracle, MySQL, PostgreSQL, and SQLite.

Python with System Programming:

Python's built-in interfaces to OS services make it ideal for writing portable shell tools.
Python's standard library comes with POSIX binding and support for all the usual OS tools.

How to create the GUI with Python?

Python/tkinter GUIs run unchanged for different platforms.

Python's simplicity and rapid turnaround make it a good match for graphical user interface programming. Python comes with a object-oriented interface to the Tk GUI API called tkinter which allows Python to implement portable GUIs with native look and feel.

Python Internet Scripting :

Python scripts can be used in the below areas very commonly:
We can communicate over sockets.
Extract form information sent to server-side CGI scripts.
It can be possible to transfer files by FTP.
We can Parse, generate, and analyze XML files.
Communicate over XML-RPC, SOAP, and Telnet.
And it is possible to Send, receive, compose, and parse email.
It is possible to etch web pages by URLs.
Parse the HTML and XML of fetched web pages.

No comments: