##// END OF EJS Templates
Removed ipapi compatability layer and updated top-level functions....
Brian Granger -
Show More
@@ -1,19 +1,10 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # encoding: utf-8
2 # encoding: utf-8
3 """
3 """
4 Oh my @#*%, where did ipapi go?
4 This module is *completely* deprecated and should no longer be used for
5
5 any purpose. Currently, we have a few parts of the core that have
6 Originally, this module was designed to be a public api for IPython. It is
6 not been componentized and thus, still rely on this module. When everything
7 now deprecated and replaced by :class:`IPython.core.Interactive` shell.
7 has been made into a component, this module will be sent to deathrow.
8 Almost all of the methods that were here are now there, but possibly renamed.
9
10 During our transition, we will keep this simple module with its :func:`get`
11 function. It too will eventually go away when the new component querying
12 interface is fully used.
13
14 Authors:
15
16 * Brian Granger
17 """
8 """
18
9
19 #-----------------------------------------------------------------------------
10 #-----------------------------------------------------------------------------
@@ -42,17 +33,3 b' def get():'
42 if inst.created > most_recent.created:
33 if inst.created > most_recent.created:
43 most_recent = inst
34 most_recent = inst
44 return most_recent
35 return most_recent
45
46 def launch_new_instance():
47 """Create a run a full blown IPython instance"""
48 from IPython.core.ipapp import IPythonApp
49 app = IPythonApp()
50 app.start()
51
52
53
54
55
56
57
58
@@ -538,6 +538,8 b' def load_default_config(ipythondir=None):'
538 return config
538 return config
539
539
540
540
541 if __name__ == '__main__':
541 def launch_new_instance():
542 """Create a run a full blown IPython instance"""
542 app = IPythonApp()
543 app = IPythonApp()
543 app.start()
544 app.start()
545
@@ -1,28 +1,6 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
2 # -*- coding: utf-8 -*-
3 """IPython -- An enhanced Interactive Python
4
3
5 This is just the startup wrapper script, kept deliberately to a minimum.
4 from IPython.core.ipapp import launch_new_instance
6
7 The shell's mainloop() takes an optional argument, sys_exit (default=0). If
8 set to 1, it calls sys.exit() at exit time. You can use the following code in
9 your PYTHONSTARTUP file:
10
11 import IPython
12 IPython.Shell.IPShell().mainloop(sys_exit=1)
13
14 [or simply IPython.Shell.IPShell().mainloop(1) ]
15
16 and IPython will be your working environment when you start python. The final
17 sys.exit() call will make python exit transparently when IPython finishes, so
18 you don't have an extra prompt to get out of.
19
20 This is probably useful to developers who manage multiple Python versions and
21 don't want to have correspondingly multiple IPython versions. Note that in
22 this mode, there is no way to pass IPython any command-line options, as those
23 are trapped first by Python itself.
24 """
25
26 from IPython.core.ipapi import launch_new_instance
27
5
28 launch_new_instance()
6 launch_new_instance()
@@ -18,7 +18,6 b' graft IPython/scripts'
18 graft IPython/testing
18 graft IPython/testing
19 graft IPython/utils
19 graft IPython/utils
20
20
21 recursive-include IPython/extensions igrid_help*
22
21
23 graft docs
22 graft docs
24 exclude docs/\#*
23 exclude docs/\#*
@@ -167,7 +167,7 b" if 'setuptools' in sys.modules:"
167 setuptools_extra_args['zip_safe'] = False
167 setuptools_extra_args['zip_safe'] = False
168 setuptools_extra_args['entry_points'] = {
168 setuptools_extra_args['entry_points'] = {
169 'console_scripts': [
169 'console_scripts': [
170 'ipython = IPython.core.ipapi:launch_new_instance',
170 'ipython = IPython.core.ipapp:launch_new_instance',
171 'pycolor = IPython.utils.PyColorize:main',
171 'pycolor = IPython.utils.PyColorize:main',
172 'ipcontroller = IPython.kernel.scripts.ipcontroller:main',
172 'ipcontroller = IPython.kernel.scripts.ipcontroller:main',
173 'ipengine = IPython.kernel.scripts.ipengine:main',
173 'ipengine = IPython.kernel.scripts.ipengine:main',
@@ -190,10 +190,6 b" if 'setuptools' in sys.modules:"
190 # Allow setuptools to handle the scripts
190 # Allow setuptools to handle the scripts
191 scripts = []
191 scripts = []
192 else:
192 else:
193 # package_data of setuptools was introduced to distutils in 2.4
194 cfgfiles = filter(isfile, glob(pjoin('IPython','config','userconfig')))
195 if sys.version_info < (2,4):
196 data_files.append(('lib', pjoin('IPython','config','userconfig'), cfgfiles))
197 # If we are running without setuptools, call this function which will
193 # If we are running without setuptools, call this function which will
198 # check for dependencies an inform the user what is needed. This is
194 # check for dependencies an inform the user what is needed. This is
199 # just to make life easy for users.
195 # just to make life easy for users.
@@ -103,7 +103,7 b' def find_packages():'
103 Find all of IPython's packages.
103 Find all of IPython's packages.
104 """
104 """
105 packages = ['IPython']
105 packages = ['IPython']
106 add_package(packages, 'config', tests=True)
106 add_package(packages, 'config', tests=True, others=['default','profile'])
107 add_package(packages, 'core', tests=True)
107 add_package(packages, 'core', tests=True)
108 add_package(packages, 'deathrow', tests=True)
108 add_package(packages, 'deathrow', tests=True)
109 add_package(packages , 'extensions')
109 add_package(packages , 'extensions')
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now