computer basics
online shopping

introduction

programming language
environment setup
basic
data type
operator
condition & iteration
number
string
list
tuple
dictionary
set
date & time
function
module

 

Advanced Topics
file formats
-csv
-xml
-json
-ini
db connections
-oracle
-other db
lambda
exception handling
os
pandas
-assignment
-solution

 

environment setup

Getting Python

The most up-to-date and current source code, binaries, documentation, news, etc., is available on the official website of Python https://www.python.org/

You can download Python documentation from https://www.python.org/doc/. The documentation is available in HTML, PDF, and PostScript formats.

 

 

Installing Python

Python distribution is available for a wide variety of platforms. You need to download only the binary code applicable for your platform and install Python.

 

Unix and Linux Installation

Open a Web browser and go to https://www.python.org/downloads/.
Follow the link to download zipped source code available for Unix/Linux.
Download and extract files.
run ./configure script
make
make install
This installs Python at standard location /usr/local/bin and its libraries at/usr/local/lib/pythonXX where XX is the version of Python.

 

Windows Installation

Open a Web browser and go to https://www.python.org/downloads/.

Follow the link for the Windows installer python-XYZ.msi file where XYZ is the version you need to install.

To use this installer python-XYZ.msi, the Windows system must support Microsoft Installer 2.0. Save the installer file to your local machine and then run it to find out if your machine supports MSI.

Run the downloaded file. This brings up the Python install wizard, which is really easy to use. Just accept the default settings, wait until the install is finished, and you are done.

 

 

Setting up PATH

Programs and other executable files can be in many directories, so operating systems provide a search path that lists the directories that the OS searches for executables.
The path is stored in an environment variable, which is a named string maintained by the operating system. This variable contains information available to the command shell and other programs.
The path variable is named as PATH in Unix or Path in Windows (Unix is casesensitive; Windows is not).

 

Setting path at Unix/Linux

In the csh shell − type setenv PATH "$PATH:/usr/local/bin/python" and press Enter.
In the bash shell (Linux) − type export ATH="$PATH:/usr/local/bin/python" and press Enter.
In the sh or ksh shell − type PATH="$PATH:/usr/local/bin/python" and press Enter.
Note − /usr/local/bin/python is the path of the Python directory

 

Setting path at Windows

At the command prompt − type path %path%;C:\Python and press Enter.
Note − C:\Python is the path of the Python directory

 

 

Running Python

There are three different ways to start Python −

Interactive Interpreter

You can start Python from Unix, DOS, or any other system that provides you a command-line interpreter or shell window.
Enter python the command line.
$python # Unix/Linux
or
python% # Unix/Linux
or
C:> python # Windows/DOS

 

Script from the Command-line

A Python script can be executed at command line by invoking the interpreter on your application, as in the following −
$python script.py # Unix/Linux
or
python% script.py # Unix/Linux
or
C: >python script.py # Windows/DOS

 

Integrated Development Environment

You can run Python from a Graphical User Interface (GUI) environment as well, if you have a GUI application on your system that supports Python.
Unix − IDLE is the very first Unix IDE for Python.
Windows − PythonWin is the first Windows interface for Python and is an IDE with a GUI.

 

 
         
 
 
www.000webhost.com