Show More
@@ -331,7 +331,29 b' def cd_completer(self, event):' | |||||
331 | if os.path.isdir(relpath): |
|
331 | if os.path.isdir(relpath): | |
332 | return [relpath] |
|
332 | return [relpath] | |
333 | raise IPython.ipapi.TryNext |
|
333 | raise IPython.ipapi.TryNext | |
334 | return found |
|
334 | ||
|
335 | ||||
|
336 | def single_dir_expand(matches): | |||
|
337 | "Recursively expand match lists containing a single dir." | |||
|
338 | ||||
|
339 | if len(matches) == 1 and os.path.isdir(matches[0]): | |||
|
340 | # Takes care of links to directories also. Use '/' | |||
|
341 | # explicitly, even under Windows, so that name completions | |||
|
342 | # don't end up escaped. | |||
|
343 | d = matches[0] | |||
|
344 | if d[-1] in ['/','\\']: | |||
|
345 | d = d[:-1] | |||
|
346 | ||||
|
347 | subdirs = [p for p in os.listdir(d) if os.path.isdir( d + '/' + p)] | |||
|
348 | if subdirs: | |||
|
349 | matches = [ (d + '/' + p) for p in subdirs ] | |||
|
350 | return single_dir_expand(matches) | |||
|
351 | else: | |||
|
352 | return matches | |||
|
353 | else: | |||
|
354 | return matches | |||
|
355 | ||||
|
356 | return single_dir_expand(found) | |||
335 |
|
357 | |||
336 | def apt_get_packages(prefix): |
|
358 | def apt_get_packages(prefix): | |
337 | out = os.popen('apt-cache pkgnames') |
|
359 | out = os.popen('apt-cache pkgnames') |
@@ -3148,13 +3148,13 b' Defaulting color scheme to \'NoColor\'"""' | |||||
3148 |
|
3148 | |||
3149 | The block is dedented prior to execution to enable execution of method |
|
3149 | The block is dedented prior to execution to enable execution of method | |
3150 | definitions. '>' and '+' characters at the beginning of a line are |
|
3150 | definitions. '>' and '+' characters at the beginning of a line are | |
3151 |
ignored, to allow pasting directly from e-mails |
|
3151 | ignored, to allow pasting directly from e-mails, diff files and doctests. | |
3152 | executed block is also assigned to variable named 'pasted_block' for |
|
3152 | The executed block is also assigned to variable named 'pasted_block' for | |
3153 | later editing with '%edit pasted_block'. |
|
3153 | later editing with '%edit pasted_block'. | |
3154 |
|
3154 | |||
3155 | You can also pass a variable name as an argument, e.g. '%cpaste foo'. |
|
3155 | You can also pass a variable name as an argument, e.g. '%cpaste foo'. | |
3156 | This assigns the pasted block to variable 'foo' as string, without |
|
3156 | This assigns the pasted block to variable 'foo' as string, without | |
3157 |
dedenting or executing it |
|
3157 | dedenting or executing it (preceding >>> and + is still stripped) | |
3158 |
|
3158 | |||
3159 | Do not be alarmed by garbled output on Windows (it's a readline bug). |
|
3159 | Do not be alarmed by garbled output on Windows (it's a readline bug). | |
3160 | Just press enter and type -- (and press enter again) and the block |
|
3160 | Just press enter and type -- (and press enter again) and the block | |
@@ -3167,7 +3167,7 b' Defaulting color scheme to \'NoColor\'"""' | |||||
3167 | sentinel = opts.get('s','--') |
|
3167 | sentinel = opts.get('s','--') | |
3168 |
|
3168 | |||
3169 | strip_from_start = [re.compile(e) for e in |
|
3169 | strip_from_start = [re.compile(e) for e in | |
3170 |
['^ |
|
3170 | [r'^\s*(\s?>)+',r'^\s*In \[\d+\]:',r'^\++']] | |
3171 | from IPython import iplib |
|
3171 | from IPython import iplib | |
3172 | lines = [] |
|
3172 | lines = [] | |
3173 | print "Pasting code; enter '%s' alone on the line to stop." % sentinel |
|
3173 | print "Pasting code; enter '%s' alone on the line to stop." % sentinel |
@@ -22,7 +22,7 b" name = 'ipython'" | |||||
22 | # because bdist_rpm does not accept dashes (an RPM) convention, and |
|
22 | # because bdist_rpm does not accept dashes (an RPM) convention, and | |
23 | # bdist_deb does not accept underscores (a Debian convention). |
|
23 | # bdist_deb does not accept underscores (a Debian convention). | |
24 |
|
24 | |||
25 |
revision = '1 |
|
25 | revision = '117' | |
26 | branch = 'ipython' |
|
26 | branch = 'ipython' | |
27 |
|
27 | |||
28 | if branch == 'ipython': |
|
28 | if branch == 'ipython': | |
@@ -30,6 +30,8 b" if branch == 'ipython':" | |||||
30 | else: |
|
30 | else: | |
31 | version = '0.8.3.bzr.r%s.%s' % (revision,branch) |
|
31 | version = '0.8.3.bzr.r%s.%s' % (revision,branch) | |
32 |
|
32 | |||
|
33 | version = '0.8.3' | |||
|
34 | ||||
33 | description = "An enhanced interactive Python shell." |
|
35 | description = "An enhanced interactive Python shell." | |
34 |
|
36 | |||
35 | long_description = \ |
|
37 | long_description = \ |
@@ -22,7 +22,10 b' __license__ = Release.license' | |||||
22 | # required modules from the Python standard library |
|
22 | # required modules from the Python standard library | |
23 | import __main__ |
|
23 | import __main__ | |
24 | import commands |
|
24 | import commands | |
25 | import doctest |
|
25 | try: | |
|
26 | import doctest | |||
|
27 | except ImportError: | |||
|
28 | pass | |||
26 | import os |
|
29 | import os | |
27 | import re |
|
30 | import re | |
28 | import shlex |
|
31 | import shlex |
@@ -702,7 +702,10 b' class InteractiveShell(object,Magic):' | |||||
702 |
|
702 | |||
703 | # Do a proper resetting of doctest, including the necessary displayhook |
|
703 | # Do a proper resetting of doctest, including the necessary displayhook | |
704 | # monkeypatching |
|
704 | # monkeypatching | |
705 | doctest_reload() |
|
705 | try: | |
|
706 | doctest_reload() | |||
|
707 | except ImportError: | |||
|
708 | warn("doctest module does not exist.") | |||
706 |
|
709 | |||
707 | # Set user colors (don't do it in the constructor above so that it |
|
710 | # Set user colors (don't do it in the constructor above so that it | |
708 | # doesn't crash if colors option is invalid) |
|
711 | # doesn't crash if colors option is invalid) |
@@ -103,9 +103,12 b' def make_IPython(argv=None,user_ns=None,user_global_ns=None,debug=1,' | |||||
103 | embedded=embedded,**kw) |
|
103 | embedded=embedded,**kw) | |
104 |
|
104 | |||
105 | # Put 'help' in the user namespace |
|
105 | # Put 'help' in the user namespace | |
106 | from site import _Helper |
|
106 | try: | |
|
107 | from site import _Helper | |||
|
108 | IP.user_ns['help'] = _Helper() | |||
|
109 | except ImportError: | |||
|
110 | warn('help() not available - check site.py') | |||
107 | IP.user_config_ns = {} |
|
111 | IP.user_config_ns = {} | |
108 | IP.user_ns['help'] = _Helper() |
|
|||
109 |
|
112 | |||
110 |
|
113 | |||
111 | if DEVDEBUG: |
|
114 | if DEVDEBUG: |
@@ -1,3 +1,14 b'' | |||||
|
1 | 2008-05-27 Ville Vainio <vivainio@gmail.com> | |||
|
2 | ||||
|
3 | * iplib.py, ipmaker.py: survive lack of doctest and site._Helper | |||
|
4 | for minimal environments (e.g. Maemo sdk python) | |||
|
5 | ||||
|
6 | * Magic.py: cpaste strips whitespace before >>> (allow pasting | |||
|
7 | doctests) | |||
|
8 | ||||
|
9 | * ipy_completers.py: cd completer now does recursive path expand | |||
|
10 | (old behaviour is buggy on some readline versions) | |||
|
11 | ||||
1 | 2008-05-14 Ville Vainio <vivainio@gmail.com> |
|
12 | 2008-05-14 Ville Vainio <vivainio@gmail.com> | |
2 |
|
13 | |||
3 | * Extensions/ipy_greedycompleter.py: |
|
14 | * Extensions/ipy_greedycompleter.py: |
@@ -60,11 +60,11 b' def install():' | |||||
60 | mkshortcut(python,'IPython scipy profile',f,a) |
|
60 | mkshortcut(python,'IPython scipy profile',f,a) | |
61 |
|
61 | |||
62 | # Create documentation shortcuts ... |
|
62 | # Create documentation shortcuts ... | |
63 |
t = prefix + r'\share\doc\ipython |
|
63 | t = prefix + r'\share\doc\ipython\manual\ipython.pdf' | |
64 | f = ip_dir + r'\Manual in PDF.lnk' |
|
64 | f = ip_dir + r'\Manual in PDF.lnk' | |
65 | mkshortcut(t,r'IPython Manual - PDF-Format',f) |
|
65 | mkshortcut(t,r'IPython Manual - PDF-Format',f) | |
66 |
|
66 | |||
67 |
t = prefix + r'\share\doc\ipython |
|
67 | t = prefix + r'\share\doc\ipython\manual\ipython.html' | |
68 | f = ip_dir + r'\Manual in HTML.lnk' |
|
68 | f = ip_dir + r'\Manual in HTML.lnk' | |
69 | mkshortcut(t,'IPython Manual - HTML-Format',f) |
|
69 | mkshortcut(t,'IPython Manual - HTML-Format',f) | |
70 |
|
70 |
@@ -3,7 +3,8 b'' | |||||
3 | tests = {'pass': ["> > > run()", |
|
3 | tests = {'pass': ["> > > run()", | |
4 | ">>> > run()", |
|
4 | ">>> > run()", | |
5 | "+++ run()", |
|
5 | "+++ run()", | |
6 |
"++ run()" |
|
6 | "++ run()", | |
|
7 | " >>> run()"], | |||
7 |
|
8 | |||
8 | 'fail': ["+ + run()", |
|
9 | 'fail': ["+ + run()", | |
9 | " ++ run()"]} |
|
10 | " ++ run()"]} |
@@ -1,5 +1,6 b'' | |||||
1 | import os,sys,shutil |
|
1 | import os,sys,shutil | |
2 |
|
2 | |||
|
3 | ||||
3 | basever = '0.8.3' |
|
4 | basever = '0.8.3' | |
4 |
|
5 | |||
5 | def oscmd(c): |
|
6 | def oscmd(c): | |
@@ -19,7 +20,7 b' def verinfo():' | |||||
19 | basename = 'ipython' |
|
20 | basename = 'ipython' | |
20 |
|
21 | |||
21 | #tarname = '%s.r%s.tgz' % (basename, ver) |
|
22 | #tarname = '%s.r%s.tgz' % (basename, ver) | |
22 | oscmd('update_revnum.py') |
|
23 | oscmd('python update_revnum.py') | |
23 |
|
24 | |||
24 | ver = verinfo() |
|
25 | ver = verinfo() | |
25 |
|
26 |
@@ -26,14 +26,25 b" if os.path.isdir('dist'):" | |||||
26 | if os.path.isdir(ipykit_name): |
|
26 | if os.path.isdir(ipykit_name): | |
27 | distutils.dir_util.remove_tree(ipykit_name) |
|
27 | distutils.dir_util.remove_tree(ipykit_name) | |
28 |
|
28 | |||
29 | c("python exesetup.py py2exe") |
|
29 | if sys.platform == 'win32': | |
|
30 | c("python exesetup.py py2exe") | |||
30 |
|
31 | |||
31 | os.rename('dist',ipykit_name) |
|
32 | os.rename('dist',ipykit_name) | |
32 |
|
33 | |||
33 | c("zip -r %s.zip %s" % (ipykit_name, ipykit_name)) |
|
34 | c("zip -r %s.zip %s" % (ipykit_name, ipykit_name)) | |
|
35 | ||||
|
36 | # Build source and binary distros | |||
|
37 | c('./setup.py sdist --formats=gztar') | |||
|
38 | ||||
|
39 | c("python2.4 ./setup.py bdist_rpm --binary-only --release=py24 --python=/usr/bin/python2.4") | |||
|
40 | c("python2.5 ./setup.py bdist_rpm --binary-only --release=py25 --python=/usr/bin/python2.5") | |||
|
41 | ||||
|
42 | # Build eggs | |||
|
43 | c('python2.4 ./eggsetup.py bdist_egg') | |||
|
44 | c('python2.5 ./eggsetup.py bdist_egg') | |||
34 |
|
45 | |||
35 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") |
|
46 | c("python setup.py bdist_wininst --install-script=ipython_win_post_install.py") | |
36 |
|
47 | |||
37 |
os.chdir( |
|
48 | os.chdir('tools') | |
38 | #c("svn export http://ipython.scipy.org/svn/ipython/ipython/trunk ipython") |
|
49 | c('python make_tarball.py') | |
39 | #c("zip -r ipython_svn.zip ipython") |
|
50 |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
1 | NO CONTENT: file was removed |
|
NO CONTENT: file was removed |
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