Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

4.1.2 Interactive Mode

When commands are read from a tty, the interpreter is said to be in interactive mode. In this mode it prompts for the next command with the primary prompt, usually three greater-than signs (‘>>> ’); for continuation lines it prompts with the secondary prompt, by default three dots (‘... ’). The interpreter prints a welcome message stating its version number and a copyright notice before printing the first prompt:

    python
    Python 1.5.2b2 (#1, Feb 28 1999, 00:02:06)
    Copyright 1991-1995 Stichting Mathematisch Centrum
    >>>

Continuation lines are needed when entering a multi-line construct. As an example, take a look at this if statement:

    >>> the_world_is_flat = 1
    >>> if the_world_is_flat:
    ...     print "Be careful not to fall off!"
    ... 
    Be careful not to fall off!

 
 
  Published under the terms of the Python License Design by Interspire