Python 3 Modules Readiness:

Please refer the below web link for getting updates over Python 3 modules Readiness.

http://py3readiness.org/

Advertisements

Python Modules or SDKs for VMware ESXi vSphere & XEN Server

Refer below for interacting with VMware vSphere using Python SDKs or Module.

Module – https://github.com/vmware/pyvmomi

Docs – https://github.com/vmware/pyvmomi 

Sample scripts.

https://github.com/vmware/pyvmomi-community-samples/blob/master/samples

 

Refer below for interacting with XEN server using Python SDKs or Module.

Module – https://pypi.org/project/XenAPI/

Docs – https://github.com/xapi-project/xen-api

Sample scripts.

https://github.com/xapi-project/xen-api/tree/master/scripts/examples/python

Data Structures & Algorithms In Python

Found an interesting website for detailed explanation about Data Structures & Algorithms in Python Along with their performance Analysis ( Big O ).And it is free for learning.

It is mainly focused on the below topics:

->  Stacks , Queues

-> Linked List

-> Recursion

-> Dynamic Programming

-> Sorting & Searching

-> Trees & Graphs

Link for website:

http://interactivepython.org/runestone/static/pythonds/index.html

Differences between Python2 vs Python3

Listing out the major features or statements which are having difference between Python 2.x and Python 3.x.

1 ) Print

2) Range functions

3) Strings

4) division operator

5) feature module

6) Exception handling

7) input function

8) object return type for some of inbuilt functions

Detailed description

Print function

Python 2.x->

print ‘Hello Welcome’

Python 3.x->

print(‘Hello Welcome’)

Note: In Python 3 print should be use like function

Range function

combining both range and xrange in Python 2.x will make range in python 3 with xrange behavior.by default python 3.x range provides iterators object.

 Strings

In Python 2.x strings are ASCII but in Python 3.x strings are by default Unicode.

Division operator

In Python if you do division ( 7/5 ) then will get result as 1 but in Python 3 division gives with floating number (like 7/5->1.4).

__feature__ module

Python 3.x feature modules add some extra attributes which are not available in Python 2.x and by using those things we can give backward compatibility for some of python 3.x features

examples

from feature import division

Exception handling
There is a small change in exception handling while using exception block , in Python 3.x you need to be handle exceptions by as keyword.

example

try:

try block

except error as err:

exception code

Input function

In Python 2.x we have two functions to take inputs from user like input ( depends on user provided value )& raw_input (everything is string) .

to combining these two functions in Python 3.x introduces only input function which takes everything as string.

Object return type for some of inbuilt functions

In Python 2.x some of the inbuilt functions provides list as a output but in Python 3.x all built in functions returns by default iterator object.

examples

zip, map, filter, dictionary keys, dictionary  values, dictionary  items, range