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