Sunday, 1 July 2012

Environment


Python is available on a wide variety of platforms:

·         Unix(Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX.etc)
·         Win 9x/NT/2000
·         Macintosh(PPC,68k)
·         OS/2
·         DOS(Multiple Version)
·         PalmOS
·         Nokia mobile phones
·         Windows CE
·         VMS/OpenVMS
·         Python has also been ported to the Java and .NET Virtual Machines.

Getting Python :
            The Official Website of Python: http://www.python.org/
            The Documentation of Python in HTML, PDF, and PostScript Formats: www.python.org/doc/

Install Python:

Unix and Linux installation:

Here are the simple steps to install Python on Unix/Linux machine.
·         Open a Web browser and go to  www.python.com/download/
·         Follow the link to download zipped source code available for Unix/Linux.
·         Download and Extract Files.
·         Editing the Modules/Setup files if you want to customize some options.
·         Run./configure script.
·         Make
·         Make install

This will install python in a standard in a standard location /usr/local/bin and its libraries are installed in /usr/local/lib/pythonXX Where XX is the version of python that you are using.

Windows Installation:

Here are the steps to install Python on Windows machine .
·         Open a Web browser and go to http://www.python.org/download/
·         Follows the link for the Windows installer python –XYZ.msi file where XYZ is the version you are going to install.
·         To use this installer python-XYZ.msi, the Windows System must support Microsoft Installer 2.0. Just Save the installer 2.0. Just save the installer file to your local machine and then run it to find out if your machine supports MSI.
·         Run the downloaded file by double-Clicking it in Windows Explorer. This bring up the python install wizard, which is really easy to use. Just accept the default settings , wait until the install is finished, and you’re ready to roll.

Setting up PATH:

Unix/Linux:

   To add the python directory to the path for a particular session in unix:
·         In the csh Shell:  setenv PATH “$PATH:/usr/local/bin/python” and press Enter.
·         In the bash shell(linux):  export  PATH=“$PATH:/usr/local/bin/python” and press Enter.
·         In the sh or ksh shell:  PATH=“$PATH:/usr/local/bin/python” and press Enter.

Windows:

To add the python directory to the path for a particular session in windows:
  At a Command prompt: type
       Path %path%;c:\python and press Enter.

No comments:

Post a Comment