Show More
@@ -62,11 +62,11 def main(): | |||||
62 | o.prompt_in2= r'\C_Green|\C_LightGreen\D\C_Green> ' |
|
62 | o.prompt_in2= r'\C_Green|\C_LightGreen\D\C_Green> ' | |
63 | o.prompt_out= '<\#> ' |
|
63 | o.prompt_out= '<\#> ' | |
64 |
|
64 | |||
65 |
from IPython import |
|
65 | from IPython.core import release | |
66 |
|
66 | |||
67 | import sys |
|
67 | import sys | |
68 | # Non-chatty banner |
|
68 | # Non-chatty banner | |
69 |
o.banner = "IPython %s [on Py %s]\n" % ( |
|
69 | o.banner = "IPython %s [on Py %s]\n" % (release.version,sys.version.split(None,1)[0]) | |
70 |
|
70 | |||
71 |
|
71 | |||
72 | ip.IP.default_option('cd','-q') |
|
72 | ip.IP.default_option('cd','-q') |
@@ -18,7 +18,7 Authors | |||||
18 | # the file COPYING, distributed as part of this software. |
|
18 | # the file COPYING, distributed as part of this software. | |
19 |
|
19 | |||
20 | from IPython.core import ipapi |
|
20 | from IPython.core import ipapi | |
21 |
from IPython import |
|
21 | from IPython.core import release | |
22 | from types import StringType |
|
22 | from types import StringType | |
23 | import sys |
|
23 | import sys | |
24 | import os |
|
24 | import os | |
@@ -299,7 +299,7 def main(): | |||||
299 | # </HACK ALERT> |
|
299 | # </HACK ALERT> | |
300 |
|
300 | |||
301 | # I like my banner minimal. |
|
301 | # I like my banner minimal. | |
302 |
o.banner = "ZOPE Py %s IPy %s\n" % (sys.version.split('\n')[0], |
|
302 | o.banner = "ZOPE Py %s IPy %s\n" % (sys.version.split('\n')[0],release.version) | |
303 |
|
303 | |||
304 | print textwrap.dedent("""\ |
|
304 | print textwrap.dedent("""\ | |
305 | ZOPE mode iPython shell. |
|
305 | ZOPE mode iPython shell. |
@@ -48,7 +48,8 import os | |||||
48 | sys.path.append(os.path.dirname(__file__) + "/Extensions") |
|
48 | sys.path.append(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','Shell'] | |||
52 |
|
53 | |||
53 | # 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 | |
54 | # access to them via IPython.<name> |
|
55 | # access to them via IPython.<name> | |
@@ -60,13 +61,13 for name in __all__: | |||||
60 | import Shell |
|
61 | import Shell | |
61 |
|
62 | |||
62 | # Release data |
|
63 | # Release data | |
63 |
from IPython import |
|
64 | from IPython.core import release # do it explicitly so pydoc can see it - pydoc bug | |
64 | __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \ |
|
65 | __author__ = '%s <%s>\n%s <%s>\n%s <%s>' % \ | |
65 |
( |
|
66 | ( release.authors['Fernando'] + release.authors['Janko'] + \ | |
66 |
|
|
67 | release.authors['Nathan'] ) | |
67 |
__license__ = |
|
68 | __license__ = release.license | |
68 |
__version__ = |
|
69 | __version__ = release.version | |
69 |
__revision__ = |
|
70 | __revision__ = release.revision | |
70 |
|
71 | |||
71 | # Namespace cleanup |
|
72 | # Namespace cleanup | |
72 | del name,glob,loc |
|
73 | del name,glob,loc |
@@ -24,7 +24,7 import sys | |||||
24 | from pprint import pformat |
|
24 | from pprint import pformat | |
25 |
|
25 | |||
26 | # Our own |
|
26 | # Our own | |
27 |
from IPython import |
|
27 | from IPython.core import release | |
28 | from IPython import ultraTB |
|
28 | from IPython import ultraTB | |
29 | from IPython.external.Itpl import itpl |
|
29 | from IPython.external.Itpl import itpl | |
30 |
|
30 | |||
@@ -166,8 +166,8 $self.bug_tracker | |||||
166 | rpt_add = report.append |
|
166 | rpt_add = report.append | |
167 |
|
167 | |||
168 | rpt_add('*'*75+'\n\n'+'IPython post-mortem report\n\n') |
|
168 | rpt_add('*'*75+'\n\n'+'IPython post-mortem report\n\n') | |
169 |
rpt_add('IPython version: %s \n\n' % |
|
169 | rpt_add('IPython version: %s \n\n' % release.version) | |
170 |
rpt_add('BZR revision : %s \n\n' % |
|
170 | rpt_add('BZR revision : %s \n\n' % release.revision) | |
171 | rpt_add('Platform info : os.name -> %s, sys.platform -> %s' % |
|
171 | rpt_add('Platform info : os.name -> %s, sys.platform -> %s' % | |
172 | (os.name,sys.platform) ) |
|
172 | (os.name,sys.platform) ) | |
173 | rpt_add(sec_sep+'Current user configuration structure:\n\n') |
|
173 | rpt_add(sec_sep+'Current user configuration structure:\n\n') | |
@@ -195,7 +195,7 class IPythonCrashHandler(CrashHandler): | |||||
195 | # Set argument defaults |
|
195 | # Set argument defaults | |
196 | app_name = 'IPython' |
|
196 | app_name = 'IPython' | |
197 | bug_tracker = 'https://bugs.launchpad.net/ipython/+filebug' |
|
197 | bug_tracker = 'https://bugs.launchpad.net/ipython/+filebug' | |
198 |
contact_name,contact_email = |
|
198 | contact_name,contact_email = release.authors[AUTHOR_CONTACT][:2] | |
199 | crash_report_fname = 'IPython_crash_report.txt' |
|
199 | crash_report_fname = 'IPython_crash_report.txt' | |
200 | # Call parent constructor |
|
200 | # Call parent constructor | |
201 | CrashHandler.__init__(self,IP,app_name,contact_name,contact_email, |
|
201 | CrashHandler.__init__(self,IP,app_name,contact_name,contact_email, | |
@@ -210,8 +210,8 class IPythonCrashHandler(CrashHandler): | |||||
210 | rpt_add = report.append |
|
210 | rpt_add = report.append | |
211 |
|
211 | |||
212 | rpt_add('*'*75+'\n\n'+'IPython post-mortem report\n\n') |
|
212 | rpt_add('*'*75+'\n\n'+'IPython post-mortem report\n\n') | |
213 |
rpt_add('IPython version: %s \n\n' % |
|
213 | rpt_add('IPython version: %s \n\n' % release.version) | |
214 |
rpt_add('BZR revision : %s \n\n' % |
|
214 | rpt_add('BZR revision : %s \n\n' % release.revision) | |
215 | rpt_add('Platform info : os.name -> %s, sys.platform -> %s' % |
|
215 | rpt_add('Platform info : os.name -> %s, sys.platform -> %s' % | |
216 | (os.name,sys.platform) ) |
|
216 | (os.name,sys.platform) ) | |
217 | rpt_add(sec_sep+'Current user configuration structure:\n\n') |
|
217 | rpt_add(sec_sep+'Current user configuration structure:\n\n') |
@@ -45,7 +45,7 from pprint import pprint | |||||
45 |
|
45 | |||
46 | # Our own |
|
46 | # Our own | |
47 | from IPython.utils import DPyGetOpt |
|
47 | from IPython.utils import DPyGetOpt | |
48 |
from IPython import |
|
48 | from IPython.core import release | |
49 | from IPython.utils.ipstruct import Struct |
|
49 | from IPython.utils.ipstruct import Struct | |
50 | from IPython.core.outputtrap import OutputTrap |
|
50 | from IPython.core.outputtrap import OutputTrap | |
51 | from IPython.config.configloader import ConfigLoader |
|
51 | from IPython.config.configloader import ConfigLoader | |
@@ -114,7 +114,7 def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1, | |||||
114 | 'for more information.\n' |
|
114 | 'for more information.\n' | |
115 | % (sys.version.split('\n')[0],), |
|
115 | % (sys.version.split('\n')[0],), | |
116 | "IPython %s -- An enhanced Interactive Python." |
|
116 | "IPython %s -- An enhanced Interactive Python." | |
117 |
% ( |
|
117 | % (release.version,), | |
118 | """\ |
|
118 | """\ | |
119 | ? -> Introduction and overview of IPython's features. |
|
119 | ? -> Introduction and overview of IPython's features. | |
120 | %quickref -> Quick reference. |
|
120 | %quickref -> Quick reference. | |
@@ -323,7 +323,7 object? -> Details about 'object'. ?object also works, ?? prints more. | |||||
323 | sys.exit() |
|
323 | sys.exit() | |
324 |
|
324 | |||
325 | if opts_all.Version: |
|
325 | if opts_all.Version: | |
326 |
print |
|
326 | print release.version | |
327 | sys.exit() |
|
327 | sys.exit() | |
328 |
|
328 | |||
329 | if opts_all.magic_docstrings: |
|
329 | if opts_all.magic_docstrings: |
@@ -21,7 +21,7 import time | |||||
21 |
|
21 | |||
22 | # IPython's own |
|
22 | # IPython's own | |
23 | from IPython.utils import coloransi |
|
23 | from IPython.utils import coloransi | |
24 |
from IPython import |
|
24 | from IPython.core import release | |
25 | from IPython.external.Itpl import ItplNS |
|
25 | from IPython.external.Itpl import ItplNS | |
26 | from IPython.core.ipapi import TryNext |
|
26 | from IPython.core.ipapi import TryNext | |
27 | from IPython.utils.ipstruct import Struct |
|
27 | from IPython.utils.ipstruct import Struct | |
@@ -170,7 +170,7 prompt_specials_color = { | |||||
170 | # Carriage return |
|
170 | # Carriage return | |
171 | r'\r': '\r', |
|
171 | r'\r': '\r', | |
172 | # Release version |
|
172 | # Release version | |
173 |
r'\v': |
|
173 | r'\v': release.version, | |
174 | # Root symbol ($ or #) |
|
174 | # Root symbol ($ or #) | |
175 | r'\$': ROOT_SYMBOL, |
|
175 | r'\$': ROOT_SYMBOL, | |
176 | } |
|
176 | } |
1 | NO CONTENT: file renamed from IPython/Release.py to IPython/core/release.py |
|
NO CONTENT: file renamed from IPython/Release.py to IPython/core/release.py |
@@ -51,3 +51,6 def test_import_prefilter(): | |||||
51 |
|
51 | |||
52 | def test_import_prompts(): |
|
52 | def test_import_prompts(): | |
53 | from IPython.core import prompts |
|
53 | from IPython.core import prompts | |
|
54 | ||||
|
55 | def test_import_release(): | |||
|
56 | from IPython.core import release No newline at end of file |
@@ -28,7 +28,7 import sys | |||||
28 | from IPython.external.Itpl import ItplNS |
|
28 | from IPython.external.Itpl import ItplNS | |
29 |
|
29 | |||
30 | from IPython.utils import coloransi |
|
30 | from IPython.utils import coloransi | |
31 |
from IPython import |
|
31 | from IPython.core import release | |
32 | from IPython.core.ipapi import TryNext |
|
32 | from IPython.core.ipapi import TryNext | |
33 | from IPython.utils.genutils import * |
|
33 | from IPython.utils.genutils import * | |
34 | import IPython.utils.generics |
|
34 | import IPython.utils.generics | |
@@ -153,7 +153,7 prompt_specials_color = { | |||||
153 | # Carriage return |
|
153 | # Carriage return | |
154 | r'\r': '\r', |
|
154 | r'\r': '\r', | |
155 | # Release version |
|
155 | # Release version | |
156 |
r'\v': |
|
156 | r'\v': release.version, | |
157 | # Root symbol ($ or #) |
|
157 | # Root symbol ($ or #) | |
158 | r'\$': ROOT_SYMBOL, |
|
158 | r'\$': ROOT_SYMBOL, | |
159 | } |
|
159 | } |
@@ -205,7 +205,7 def make_runners(): | |||||
205 | 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', |
|
205 | 'iplib.py', 'ipmaker.py', 'ipstruct.py', 'Itpl.py', | |
206 | 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', |
|
206 | 'logger.py', 'macro.py', 'magic.py', 'oinspect.py', | |
207 | 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', |
|
207 | 'outputtrap.py', 'platutils.py', 'prefilter.py', 'prompts.py', | |
208 |
'PyColorize.py', ' |
|
208 | 'PyColorize.py', 'release.py', 'rlineimpl.py', 'shadowns.py', | |
209 | 'shellglobals.py', 'strdispatch.py', 'twshell.py', |
|
209 | 'shellglobals.py', 'strdispatch.py', 'twshell.py', | |
210 | 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', |
|
210 | 'ultraTB.py', 'upgrade_dir.py', 'usage.py', 'wildcard.py', | |
211 | # See note above for why this is skipped |
|
211 | # See note above for why this is skipped |
General Comments 0
You need to be logged in to leave comments.
Login now