i
Python functionality and evolution
Installing Python (windows and Ubuntu)
IDLE (Integrated Development and Learning Environment)
Write the first python program and execute it
Keywords in Python
Identifiers in Python
Indentation in Python
Comments in Python
Multi-line Comments in Python
Getting user input
Python Function
Calling a function
Arguments in Function
Scope of Variables
Modules in Python
The PYTHON PATH-Variable
Python File Open
Python File Opening Modes
The file-Object-Attributes
Python File Close() Method
Python File Read/Write
Python File Position
Renaming and Deleting Files in Python
Python Directory Methods
File/Directory Methods
Exceptions in Python
The try-finally Clause
The argument of Exception
Raising Exceptions
Python Built-in Exceptions
Python OOPs Concepts
Python Classes/Objects
Creating Instance Objects
Accessing Attributes
Built-In Class Attributes
Garbage Collection
Python Inheritance
Overriding Methods
Method overriding
Data Hiding
Regular Expression
The match function
The search function
Match Object Methods & Description
Matching or Searching
Search or Replace
Regular Expression Modifiers / Option Flags
Grouping with Parentheses
Python Socket Programming
Python Socket Server
Python Socket Client
Send Data Between Clients
Python Socket or Server
Python Socket Clients
Points to ponder
There are three ways for this :
• File-Object-Methods: This provides provides functions to manipulate files.
• OS-Object Methods: This helps to process files as well as directories.
Python has also exception handling method for handle any unexpected error.
List of Standard Exceptions −
Exception Name / Description
1 Exception>>>Base class for the all exceptions
2 StopIteration>>> Raised when next() method of iterator does not point to any of the object.
3 SystemExit>>>>Raised by sys.exit() function.
4 StandardError>>>Base class for all built in exceptions except StopIteration / SystemExit.
5 ArithmeticError>>>>Base class for all errors for the numeric-calculation.
6 OverflowError>>>>It raises when calculation exceeds the maximum limit for numeric -type.
7 FloatingPointError>>>It raises when floating-point calculation - fails.
8 ZeroDivisionError>>>It raises when division or modulo by zero takes place for numeric - types.
9 AssertionError>>>It raises in case of failure of Assert-statement.
10 AttributeError>>>It raises in case of failure of attribute reference / assignment.
11 EOFError>>>It raises when no input either raw_input() / input() function and end of file reached.
12 ImportError>>>>Raised if import statement fails.
13 KeyboardInterrupt>>>> Raised when user interrupts program execution by pressing Ctr+c.
14 LookupError>>>Base class all lookup errors.
15 IndexError>>> Raised when an index not found in sequence.
16 KeyError>>>Raised when specified key is not found/dictionary.
17 NameError>>>It raises when an identifier is not found in local / global namespace.
18 UnboundLocalError>>> Raised when trying to access local variable in function or method but no value assigned to it.
19 EnvironmentError>>>Base class for all exceptions outside Python-environment.
20 IOError>>>It raises when an input/ output operation fails.
21 IOError>>> Raised for operating-system-related errors.
22 SyntaxError>>> Raised when there is error in the python syntax.
23 IndentationError>>>Raised when indentation is not mentioned properly.
24 SystemError>>> Raised when interpreter finds an internal problem but when this error is encountered the python interpreter don’t exist.
25 SystemExit>>>It raises when Python interpreter is quit by using sys.exit() function.
26 TypeError>>>Raised when an operation / function is attempted that is invalid for data type.
27 ValueError>>>Raised when built-in function for data type has valid type of argument but the arguments have invalid values specified.
28 RuntimeError>>>Raised when generated error don’t fall into any category.
29 NotImplementedError>>>Raised when abstract method that needs to be implemented in the inherited class is not implemented.
Don't miss out!