##// END OF EJS Templates
Merging upstream changes from module-reorg branch.
Brian Granger -
r2075:132b27d4 merge
parent child Browse files
Show More
@@ -1,73 +1,76 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 IPython -- An enhanced Interactive Python
3 IPython -- An enhanced Interactive Python
4
4
5 One of Python's nicest features is its interactive interpreter. This allows
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
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
7 typical in most programming languages. However, the interpreter supplied with
8 the standard Python distribution is fairly primitive (and IDLE isn't really
8 the standard Python distribution is fairly primitive (and IDLE isn't really
9 much better).
9 much better).
10
10
11 IPython tries to:
11 IPython tries to:
12
12
13 i - provide an efficient environment for interactive work in Python
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
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
15 Python prompt, and adds many features to make interactive work much more
16 efficient.
16 efficient.
17
17
18 ii - offer a flexible framework so that it can be used as the base
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
19 environment for other projects and problems where Python can be the
20 underlying language. Specifically scientific environments like Mathematica,
20 underlying language. Specifically scientific environments like Mathematica,
21 IDL and Mathcad inspired its design, but similar ideas can be useful in many
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
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
23 (due to its dynamic and introspective features), and with suitable libraries
24 entire systems could be built leveraging Python's power.
24 entire systems could be built leveraging Python's power.
25
25
26 iii - serve as an embeddable, ready to go interpreter for your own programs.
26 iii - serve as an embeddable, ready to go interpreter for your own programs.
27
27
28 IPython requires Python 2.4 or newer.
28 IPython requires Python 2.4 or newer.
29 """
29 """
30
30
31 #*****************************************************************************
31 #*****************************************************************************
32 # Copyright (C) 2008-2009 The IPython Development Team
32 # Copyright (C) 2008-2009 The IPython Development Team
33 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
33 # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu>
34 #
34 #
35 # Distributed under the terms of the BSD License. The full license is in
35 # Distributed under the terms of the BSD License. The full license is in
36 # the file COPYING, distributed as part of this software.
36 # the file COPYING, distributed as part of this software.
37 #*****************************************************************************
37 #*****************************************************************************
38
38
39 # Enforce proper version requirements
39 # Enforce proper version requirements
40 import sys
40 import sys
41
41
42 if sys.version[0:3] < '2.4':
42 if sys.version[0:3] < '2.4':
43 raise ImportError('Python Version 2.4 or above is required for IPython.')
43 raise ImportError('Python Version 2.4 or above is required for IPython.')
44
44
45 # Make it easy to import extensions - they are always directly on pythonpath.
45 # Make it easy to import extensions - they are always directly on pythonpath.
46 # Therefore, non-IPython modules can be added to extensions directory
46 # Therefore, non-IPython modules can be added to extensions directory
47 import os
47 import os
48 sys.path.append(os.path.join(os.path.dirname(__file__), "extensions"))
48 sys.path.append(os.path.join(os.path.dirname(__file__), "extensions"))
49
49
50 # Define what gets imported with a 'from IPython import *'
50 # Define what gets imported with a 'from IPython import *'
51 __all__ = ['IPython.core.ipapi','utils.generics','utils.ipstruct',
51 __all__ = ['IPython.core.ipapi','utils.generics','utils.ipstruct',
52 'core.release','core.shell']
52 'core.release','core.shell']
53
53
54 # Load __all__ in IPython namespace so that a simple 'import IPython' gives
54 # Load __all__ in IPython namespace so that a simple 'import IPython' gives
55 # access to them via IPython.<name>
55 # access to them via IPython.<name>
56 glob,loc = globals(),locals()
56 glob,loc = globals(),locals()
57 for name in __all__:
57 for name in __all__:
58 #print 'Importing: ',name # dbg
58 #print 'Importing: ',name # dbg
59 __import__(name,glob,loc,[])
59 __import__(name,glob,loc,[])
60
60
61 from IPython.core import shell
61 from IPython.core import shell
62 Shell = shell
63 from IPython.core import ipapi
64 from IPython.core import iplib
62
65
63 # Release data
66 # Release data
64 from IPython.core import release # do it explicitly so pydoc can see it - pydoc bug
67 from IPython.core import release # do it explicitly so pydoc can see it - pydoc bug
65 __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
68 __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \
66 ( release.authors['Fernando'] + release.authors['Janko'] + \
69 ( release.authors['Fernando'] + release.authors['Janko'] + \
67 release.authors['Nathan'] )
70 release.authors['Nathan'] )
68 __license__ = release.license
71 __license__ = release.license
69 __version__ = release.version
72 __version__ = release.version
70 __revision__ = release.revision
73 __revision__ = release.revision
71
74
72 # Namespace cleanup
75 # Namespace cleanup
73 del name,glob,loc
76 del name,glob,loc
General Comments 0
You need to be logged in to leave comments. Login now