RSS

Archives

Aside

                    PYTHON is a high-level programming language which is used in thousands of

real-world business applications.It is an interpreted language. i.e. we can execute python 

programs by using an interpreter instead of a compiler.

The interpreter can be used for the execution of programs in any of the following two modes

  •    interactive mode :-interpreter reads and executes commands.
  •    script mode :-it reads and executes a script from a file.

Python’s interactive mode makes it easy to test short snippets of code.

To run python interpreter interactively, just type $ python in the terminal.

Before printing the first prompt(>>>),the interpreter prints a welcome message stating its

version number and a copyright notice as shown below .

Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)

[GCC 4.4.5] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

>>>

The three right-angle brackets ,”>>>” is a python prompt indicating that the interpreter is

ready to use. One problem of the interactive mode is that , if we want to use them again the

next time,we have to type them all over again.So these definitions are stored in a separate

file ,called module or script and it is saved on disk.We can use this script later. Python files

have .py extension. For the execution of a script , the file name should be specified.

Basic Introduction

Advertisements