~ipython-dev/ipython/0.10.1

« back to all changes in this revision

Viewing changes to IPython/__init__.py

  • Committer: Fernando Perez
  • Date: 2008-06-02 01:26:30 UTC
  • mfrom: (0.1.130 ipython-local)
  • Revision ID: fernando.perez@berkeley.edu-20080602012630-m14vezrhydzvahf8
Merge in all development done in bzr since February 16 2008.

At that time, a clean bzr branch was started from the SVN tree, but
without SVN history.  That SVN history has now been used as the basis
of this branch, and the development done on the history-less BZR
branch has been added and is the content of this merge.  

This branch will be the new official main line of development in
Launchpad (equivalent to the old SVN trunk).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
"""
 
3
IPython -- An enhanced Interactive Python
 
4
 
 
5
One of Python's nicest features is its interactive interpreter. This allows
 
6
very fast testing of ideas without the overhead of creating test files as is
 
7
typical in most programming languages. However, the interpreter supplied with
 
8
the standard Python distribution is fairly primitive (and IDLE isn't really
 
9
much better).
 
10
 
 
11
IPython tries to:
 
12
 
 
13
  i - provide an efficient environment for interactive work in Python
 
14
  programming. It tries to address what we see as shortcomings of the standard
 
15
  Python prompt, and adds many features to make interactive work much more
 
16
  efficient.
 
17
 
 
18
  ii - offer a flexible framework so that it can be used as the base
 
19
  environment for other projects and problems where Python can be the
 
20
  underlying language. Specifically scientific environments like Mathematica,
 
21
  IDL and Mathcad inspired its design, but similar ideas can be useful in many
 
22
  fields. Python is a fabulous language for implementing this kind of system
 
23
  (due to its dynamic and introspective features), and with suitable libraries
 
24
  entire systems could be built leveraging Python's power.
 
25
 
 
26
  iii - serve as an embeddable, ready to go interpreter for your own programs.
 
27
 
 
28
IPython requires Python 2.3 or newer.
 
29
 
 
30
$Id: __init__.py 2399 2007-05-26 10:23:10Z vivainio $"""
 
31
 
 
32
#*****************************************************************************
 
33
#       Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
 
34
#
 
35
#  Distributed under the terms of the BSD License.  The full license is in
 
36
#  the file COPYING, distributed as part of this software.
 
37
#*****************************************************************************
 
38
 
 
39
# Enforce proper version requirements
 
40
import sys
 
41
 
 
42
if sys.version[0:3] < '2.3':
 
43
    raise ImportError('Python Version 2.3 or above is required for IPython.')
 
44
 
 
45
# Make it easy to import extensions - they are always directly on pythonpath.
 
46
# Therefore, non-IPython modules can be added to Extensions directory
 
47
import os
 
48
sys.path.append(os.path.dirname(__file__) + "/Extensions")
 
49
 
 
50
# Define what gets imported with a 'from IPython import *'
 
51
__all__ = ['ipapi','generics','ipstruct','Release','Shell']
 
52
 
 
53
# Load __all__ in IPython namespace so that a simple 'import IPython' gives
 
54
# access to them via IPython.<name>
 
55
glob,loc = globals(),locals()
 
56
for name in __all__:
 
57
    __import__(name,glob,loc,[])
 
58
 
 
59
import Shell
 
60
 
 
61
# Release data
 
62
from IPython import Release # do it explicitly so pydoc can see it - pydoc bug
 
63
__author__   = '%s <%s>\n%s <%s>\n%s <%s>' % \
 
64
               ( Release.authors['Fernando'] + Release.authors['Janko'] + \
 
65
                 Release.authors['Nathan'] )
 
66
__license__  = Release.license
 
67
__version__  = Release.version
 
68
__revision__ = Release.revision
 
69
 
 
70
# Namespace cleanup
 
71
del name,glob,loc