Web-Crawling With Python:

Crawling Web Data at ease with below Python modules.

Scrapy  – https://scrapy.org/

Beautiful Soup – https://www.crummy.com/software/BeautifulSoup/bs4/doc/


Socket Programming with Python:

Module For Socket Programming in Python: Socket

For more information and explanation refer the below links.





Why Python is good for Test Automation??

I am posting here reasons for selecting Python as automation language.

1) Vast Libraries.

2) Easy understanding(Even Tester can write scripts without deep programming skills)

3) Easy abstraction for Hardware – Embedded.

4) Fast Execution.

5) Easy code maintenance.

6) Availability of Open Source  testing tools – Selenium

7) Having inbuilt support for Unit Testing – UnitTest, Nose

These things will make Python as a choice for Automation testing.

What Is The Python answer for ROR???

It’s Django– The Web framework for perfectionist with deadlines.

Why Django:

1) Excellent ORM (object relational mapper)

2) Automatic admin interface

3) Elegant URL Design

4) Pluggable Template system

5) Cache System

7) Internalization

Who are Using Django?

1) Mozilla

2) Open Stack

3) Bit Bucket

4 ) Git Hub

5 ) Heroku

And many more…


Stack and Queue Implementation in Python:

We can use Python’s List as Stack and Queue:

The list methods make it very easy to use a list as a stack, where the last element added is the first element retrieved (“last-in, first-out”). To add an item to the top of the stack, use append(). To retrieve an item from the top of the stack, use pop() without an explicit index.


>> stack = [3, 4, 5] >>> stack.append(6) >>> stack.append(7) >>> stack [3, 4, 5, 6, 7] >>> stack.pop() 7 >>> stack [3, 4, 5, 6] >>> stack.pop() 6 >>> stack.pop() 5 >>> stack [3, 4]

It is also possible to use a list as a queue, where the first element added is the first element retrieved (“first-in, first-out”); however, lists are not efficient for this purpose. While appends and pops from the end of list are fast, doing inserts or pops from the beginning of a list is slow (because all of the other elements have to be shifted by one).

To implement a queue, use collections.deque which was designed to have fast appends and pops from both ends.


>> from collections import deque >>> queue = deque([“Eric”, “John”, “Michael”]) >>> queue.append(“Terry”) # Terry arrives >>> queue.append(“Graham”) # Graham arrives >>> queue.popleft() # The first to arrive now leaves ‘Eric’ >>> queue.popleft() # The second to arrive now leaves ‘John’ >>> queue # Remaining queue in order of arrival deque([‘Michael’, ‘Terry’, ‘Graham’])

What Makes Python Different from others??

1) Simple code & clean syntax

2) Indentation

3) Vast standard library

4) Everything is object (it makes Python is king in functional programming language)

5) Dynamic memory type

6) Data types(List, Tuple, Dictionary, Sets)

7) Super support for Regular Expression

8) Extendable and Embedded Support

9) Rich Programming community.

There is no end for Python futures.These are the just samples.