Show More
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Tools for coloring text in ANSI terminals. |
|
2 | """Tools for coloring text in ANSI terminals. | |
3 |
|
3 | """ | ||
4 | $Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu> |
|
6 | # Copyright (C) 2002-2006 Fernando Perez. <fperez@colorado.edu> | |
@@ -10,10 +9,6 b' $Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $"""' | |||||
10 | # the file COPYING, distributed as part of this software. |
|
9 | # the file COPYING, distributed as part of this software. | |
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
12 |
|
11 | |||
13 | from IPython import Release |
|
|||
14 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
15 | __license__ = Release.license |
|
|||
16 |
|
||||
17 | __all__ = ['TermColors','InputTermColors','ColorScheme','ColorSchemeTable'] |
|
12 | __all__ = ['TermColors','InputTermColors','ColorScheme','ColorSchemeTable'] | |
18 |
|
13 | |||
19 | import os |
|
14 | import os |
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Configuration loader |
|
2 | """Configuration loader | |
3 |
|
3 | """ | ||
4 | $Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
6 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> | |
@@ -10,10 +9,6 b' $Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $"""' | |||||
10 | # the file COPYING, distributed as part of this software. |
|
9 | # the file COPYING, distributed as part of this software. | |
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
12 |
|
11 | |||
13 | from IPython import Release |
|
|||
14 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
15 | __license__ = Release.license |
|
|||
16 |
|
||||
17 | import exceptions |
|
12 | import exceptions | |
18 | import os |
|
13 | import os | |
19 | from pprint import pprint |
|
14 | from pprint import pprint |
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """sys.excepthook for IPython itself, leaves a detailed report on disk. |
|
2 | """sys.excepthook for IPython itself, leaves a detailed report on disk. | |
3 |
|
3 | """ | ||
4 | $Id: CrashHandler.py 2908 2007-12-30 21:07:46Z vivainio $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
6 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -1,8 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """DPyGetOpt -- Demiurge Python GetOptions Module |
|
2 | """DPyGetOpt -- Demiurge Python GetOptions Module | |
3 |
|
3 | |||
4 | $Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $ |
|
|||
5 |
|
||||
6 | This module is modeled after perl's Getopt::Long module-- which |
|
4 | This module is modeled after perl's Getopt::Long module-- which | |
7 | is, in turn, modeled after GNU's extended getopt() function. |
|
5 | is, in turn, modeled after GNU's extended getopt() function. | |
8 |
|
6 | |||
@@ -32,8 +30,7 b" characters; ie-- 'foo|bar|baz=f@' specifies that all -foo, -bar," | |||||
32 | and -baz options that appear on within the parsed argument list |
|
30 | and -baz options that appear on within the parsed argument list | |
33 | must have a real number argument and that the accumulated list |
|
31 | must have a real number argument and that the accumulated list | |
34 | of values will be available under the name 'foo' |
|
32 | of values will be available under the name 'foo' | |
35 |
|
33 | """ | ||
36 | $Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $""" |
|
|||
37 |
|
34 | |||
38 | #***************************************************************************** |
|
35 | #***************************************************************************** | |
39 | # |
|
36 | # |
@@ -13,9 +13,7 b' The code in this file is mainly lifted out of cmd.py in Python 2.2, with minor' | |||||
13 | changes. Licensing should therefore be under the standard Python terms. For |
|
13 | changes. Licensing should therefore be under the standard Python terms. For | |
14 | details on the PSF (Python Software Foundation) standard license, see: |
|
14 | details on the PSF (Python Software Foundation) standard license, see: | |
15 |
|
15 | |||
16 | http://www.python.org/2.2.3/license.html |
|
16 | http://www.python.org/2.2.3/license.html""" | |
17 |
|
||||
18 | $Id: Debugger.py 2913 2007-12-31 12:42:14Z vivainio $""" |
|
|||
19 |
|
17 | |||
20 | #***************************************************************************** |
|
18 | #***************************************************************************** | |
21 | # |
|
19 | # | |
@@ -27,10 +25,6 b' $Id: Debugger.py 2913 2007-12-31 12:42:14Z vivainio $"""' | |||||
27 | # |
|
25 | # | |
28 | #***************************************************************************** |
|
26 | #***************************************************************************** | |
29 |
|
27 | |||
30 | from IPython import Release |
|
|||
31 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
32 | __license__ = 'Python' |
|
|||
33 |
|
||||
34 | import bdb |
|
28 | import bdb | |
35 | import cmd |
|
29 | import cmd | |
36 | import linecache |
|
30 | import linecache |
@@ -4,8 +4,7 b'' | |||||
4 | We define a special input line filter to allow typing lines which begin with |
|
4 | We define a special input line filter to allow typing lines which begin with | |
5 | '~', '/' or '.'. If one of those strings is encountered, it is automatically |
|
5 | '~', '/' or '.'. If one of those strings is encountered, it is automatically | |
6 | executed. |
|
6 | executed. | |
7 |
|
7 | """ | ||
8 | $Id: InterpreterExec.py 2724 2007-09-07 08:05:38Z fperez $""" |
|
|||
9 |
|
8 | |||
10 | #***************************************************************************** |
|
9 | #***************************************************************************** | |
11 | # Copyright (C) 2004 W.J. van der Laan <gnufnork@hetdigitalegat.nl> |
|
10 | # Copyright (C) 2004 W.J. van der Laan <gnufnork@hetdigitalegat.nl> | |
@@ -15,11 +14,6 b' $Id: InterpreterExec.py 2724 2007-09-07 08:05:38Z fperez $"""' | |||||
15 | # the file COPYING, distributed as part of this software. |
|
14 | # the file COPYING, distributed as part of this software. | |
16 | #***************************************************************************** |
|
15 | #***************************************************************************** | |
17 |
|
16 | |||
18 | from IPython import Release |
|
|||
19 | __author__ = 'W.J. van der Laan <gnufnork@hetdigitalegat.nl>, '\ |
|
|||
20 | '%s <%s>' % Release.authors['Fernando'] |
|
|||
21 | __license__ = Release.license |
|
|||
22 |
|
||||
23 | # TODO: deprecated |
|
17 | # TODO: deprecated | |
24 | def prefilter_shell(self,line,continuation): |
|
18 | def prefilter_shell(self,line,continuation): | |
25 | """Alternate prefilter, modified for shell-like functionality. |
|
19 | """Alternate prefilter, modified for shell-like functionality. |
@@ -6,9 +6,6 b' Provides' | |||||
6 | var = %magic blah blah |
|
6 | var = %magic blah blah | |
7 |
|
7 | |||
8 | var = !ls |
|
8 | var = !ls | |
9 |
|
||||
10 | $Id: genutils.py 1077 2006-01-24 18:15:27Z vivainio $ |
|
|||
11 |
|
||||
12 | """ |
|
9 | """ | |
13 |
|
10 | |||
14 | import IPython.ipapi |
|
11 | import IPython.ipapi |
@@ -3,8 +3,6 b'' | |||||
3 | %store magic for lightweight persistence. |
|
3 | %store magic for lightweight persistence. | |
4 |
|
4 | |||
5 | Stores variables, aliases etc. in PickleShare database. |
|
5 | Stores variables, aliases etc. in PickleShare database. | |
6 |
|
||||
7 | $Id: iplib.py 1107 2006-01-30 19:02:20Z vivainio $ |
|
|||
8 | """ |
|
6 | """ | |
9 |
|
7 | |||
10 | import IPython.ipapi |
|
8 | import IPython.ipapi |
@@ -4,8 +4,7 b' Class which mimics a module.' | |||||
4 |
|
4 | |||
5 | Needed to allow pickle to correctly resolve namespaces during IPython |
|
5 | Needed to allow pickle to correctly resolve namespaces during IPython | |
6 | sessions. |
|
6 | sessions. | |
7 |
|
7 | """ | ||
8 | $Id: FakeModule.py 2754 2007-09-09 10:16:59Z fperez $""" |
|
|||
9 |
|
8 | |||
10 | #***************************************************************************** |
|
9 | #***************************************************************************** | |
11 | # Copyright (C) 2002-2004 Fernando Perez. <fperez@colorado.edu> |
|
10 | # Copyright (C) 2002-2004 Fernando Perez. <fperez@colorado.edu> |
@@ -12,8 +12,7 b' This module is meant to be used as a drop-in replacement to the original' | |||||
12 | Gnuplot, so it should be safe to do: |
|
12 | Gnuplot, so it should be safe to do: | |
13 |
|
13 | |||
14 | import IPython.Gnuplot2 as Gnuplot |
|
14 | import IPython.Gnuplot2 as Gnuplot | |
15 |
|
15 | """ | ||
16 | $Id: Gnuplot2.py 1210 2006-03-13 01:19:31Z fperez $""" |
|
|||
17 |
|
16 | |||
18 | import cStringIO |
|
17 | import cStringIO | |
19 | import os |
|
18 | import os |
@@ -9,8 +9,7 b' http://gnuplot-py.sourceforge.net/' | |||||
9 | See gphelp() below for details on the services offered by this module. |
|
9 | See gphelp() below for details on the services offered by this module. | |
10 |
|
10 | |||
11 | Inspired by a suggestion/request from Arnd Baecker. |
|
11 | Inspired by a suggestion/request from Arnd Baecker. | |
12 |
|
12 | """ | ||
13 | $Id: GnuplotInteractive.py 389 2004-10-09 07:59:30Z fperez $""" |
|
|||
14 |
|
13 | |||
15 | __all__ = ['Gnuplot','gp','gp_new','plot','plot2','splot','replot', |
|
14 | __all__ = ['Gnuplot','gp','gp_new','plot','plot2','splot','replot', | |
16 | 'hardcopy','gpdata','gpfile','gpstring','gpfunc','gpgrid', |
|
15 | 'hardcopy','gpdata','gpfile','gpstring','gpfunc','gpgrid', |
@@ -47,8 +47,7 b' can be downloaded from:' | |||||
47 | http://gnuplot-py.sourceforge.net/ |
|
47 | http://gnuplot-py.sourceforge.net/ | |
48 |
|
48 | |||
49 | Inspired by a suggestion/request from Arnd Baecker. |
|
49 | Inspired by a suggestion/request from Arnd Baecker. | |
50 |
|
50 | """ | ||
51 | $Id: GnuplotRuntime.py 389 2004-10-09 07:59:30Z fperez $""" |
|
|||
52 |
|
51 | |||
53 | __all__ = ['Gnuplot','gp','gp_new','Data','File','Func','GridData', |
|
52 | __all__ = ['Gnuplot','gp','gp_new','Data','File','Func','GridData', | |
54 | 'pm3d_config','eps_fix_bbox'] |
|
53 | 'pm3d_config','eps_fix_bbox'] |
@@ -27,7 +27,7 b' how to do interpolation:' | |||||
27 | import Itpl |
|
27 | import Itpl | |
28 | sys.stdout = Itpl.filter() |
|
28 | sys.stdout = Itpl.filter() | |
29 | f = "fancy" |
|
29 | f = "fancy" | |
30 |
print "Is |
|
30 | print "Is this not $f?" | |
31 | print "Standard output has been replaced with a $sys.stdout object." |
|
31 | print "Standard output has been replaced with a $sys.stdout object." | |
32 | sys.stdout = Itpl.unfilter() |
|
32 | sys.stdout = Itpl.unfilter() | |
33 | print "Okay, back $to $normal." |
|
33 | print "Okay, back $to $normal." | |
@@ -43,9 +43,7 b' each time the instance is evaluated with str(instance). For example:' | |||||
43 | print str(s) |
|
43 | print str(s) | |
44 | foo = "bar" |
|
44 | foo = "bar" | |
45 | print str(s) |
|
45 | print str(s) | |
46 |
|
46 | """ | ||
47 | $Id: Itpl.py 2918 2007-12-31 14:34:47Z vivainio $ |
|
|||
48 | """ # ' -> close an open quote for stupid emacs |
|
|||
49 |
|
47 | |||
50 | #***************************************************************************** |
|
48 | #***************************************************************************** | |
51 | # |
|
49 | # |
@@ -1,8 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | Logger class for IPython's logging facilities. |
|
3 | Logger class for IPython's logging facilities. | |
4 |
|
||||
5 | $Id: Logger.py 2875 2007-11-26 08:37:39Z fperez $ |
|
|||
6 | """ |
|
4 | """ | |
7 |
|
5 | |||
8 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
@@ -16,11 +14,6 b' $Id: Logger.py 2875 2007-11-26 08:37:39Z fperez $' | |||||
16 | #**************************************************************************** |
|
14 | #**************************************************************************** | |
17 | # Modules and globals |
|
15 | # Modules and globals | |
18 |
|
16 | |||
19 | from IPython import Release |
|
|||
20 | __author__ = '%s <%s>\n%s <%s>' % \ |
|
|||
21 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) |
|
|||
22 | __license__ = Release.license |
|
|||
23 |
|
||||
24 | # Python standard modules |
|
17 | # Python standard modules | |
25 | import glob |
|
18 | import glob | |
26 | import os |
|
19 | import os |
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Magic functions for InteractiveShell. |
|
2 | """Magic functions for InteractiveShell. | |
3 |
|
3 | """ | ||
4 | $Id: Magic.py 2996 2008-01-30 06:31:39Z fperez $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
|
6 | # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and |
@@ -5,8 +5,6 b' Uses syntax highlighting for presenting the various information elements.' | |||||
5 |
|
5 | |||
6 | Similar in spirit to the inspect module, but all calls take a name argument to |
|
6 | Similar in spirit to the inspect module, but all calls take a name argument to | |
7 | reference the name under which an object is being read. |
|
7 | reference the name under which an object is being read. | |
8 |
|
||||
9 | $Id: OInspect.py 2843 2007-10-15 21:22:32Z fperez $ |
|
|||
10 | """ |
|
8 | """ | |
11 |
|
9 | |||
12 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
@@ -16,10 +14,6 b' $Id: OInspect.py 2843 2007-10-15 21:22:32Z fperez $' | |||||
16 | # the file COPYING, distributed as part of this software. |
|
14 | # the file COPYING, distributed as part of this software. | |
17 | #***************************************************************************** |
|
15 | #***************************************************************************** | |
18 |
|
16 | |||
19 | from IPython import Release |
|
|||
20 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
21 | __license__ = Release.license |
|
|||
22 |
|
||||
23 | __all__ = ['Inspector','InspectColors'] |
|
17 | __all__ = ['Inspector','InspectColors'] | |
24 |
|
18 | |||
25 | # stdlib modules |
|
19 | # stdlib modules |
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Class to trap stdout and stderr and log them separately. |
|
2 | """Class to trap stdout and stderr and log them separately. | |
3 |
|
3 | """ | ||
4 | $Id: OutputTrap.py 958 2005-12-27 23:17:51Z fperez $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> |
|
6 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> | |
@@ -10,10 +9,6 b' $Id: OutputTrap.py 958 2005-12-27 23:17:51Z fperez $"""' | |||||
10 | # the file COPYING, distributed as part of this software. |
|
9 | # the file COPYING, distributed as part of this software. | |
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
12 |
|
11 | |||
13 | from IPython import Release |
|
|||
14 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
15 | __license__ = Release.license |
|
|||
16 |
|
||||
17 | import exceptions |
|
12 | import exceptions | |
18 | import sys |
|
13 | import sys | |
19 | from cStringIO import StringIO |
|
14 | from cStringIO import StringIO |
@@ -1,8 +1,7 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | Classes for handling input/output prompts. |
|
3 | Classes for handling input/output prompts. | |
4 |
|
4 | """ | ||
5 | $Id: Prompts.py 3026 2008-02-07 16:03:16Z vivainio $""" |
|
|||
6 |
|
5 | |||
7 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
8 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
|
7 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
@@ -27,8 +27,7 b'' | |||||
27 |
|
|
27 | It shows how to use the built-in keyword, token and tokenize modules to | |
28 |
|
|
28 | scan Python source code and re-emit it with no changes to its original | |
29 |
|
|
29 | formatting (which is the hard part). | |
30 |
|
30 | """ | ||
31 | $Id: PyColorize.py 2586 2007-08-06 19:30:09Z vivainio $""" |
|
|||
32 |
|
31 | |||
33 | __all__ = ['ANSICodeColors','Parser'] |
|
32 | __all__ = ['ANSICodeColors','Parser'] | |
34 |
|
33 |
@@ -3,8 +3,7 b'' | |||||
3 |
|
3 | |||
4 | All the matplotlib support code was co-developed with John Hunter, |
|
4 | All the matplotlib support code was co-developed with John Hunter, | |
5 | matplotlib's author. |
|
5 | matplotlib's author. | |
6 |
|
6 | """ | ||
7 | $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $""" |
|
|||
8 |
|
7 | |||
9 | #***************************************************************************** |
|
8 | #***************************************************************************** | |
10 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> |
|
9 | # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> | |
@@ -13,10 +12,6 b' $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $"""' | |||||
13 | # the file COPYING, distributed as part of this software. |
|
12 | # the file COPYING, distributed as part of this software. | |
14 | #***************************************************************************** |
|
13 | #***************************************************************************** | |
15 |
|
14 | |||
16 | from IPython import Release |
|
|||
17 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
18 | __license__ = Release.license |
|
|||
19 |
|
||||
20 | # Code begins |
|
15 | # Code begins | |
21 | # Stdlib imports |
|
16 | # Stdlib imports | |
22 | import __builtin__ |
|
17 | import __builtin__ |
@@ -25,9 +25,8 b' IPython tries to:' | |||||
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. |
|
28 | IPython requires Python 2.4 or newer. | |
29 |
|
29 | """ | ||
30 | $Id: __init__.py 2399 2007-05-26 10:23:10Z vivainio $""" |
|
|||
31 |
|
30 | |||
32 | #***************************************************************************** |
|
31 | #***************************************************************************** | |
33 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
32 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -17,8 +17,6 b' http://folk.uio.no/hpl/scripting' | |||||
17 |
|
17 | |||
18 | (although ultimately no code from this text was used, as IPython's system is a |
|
18 | (although ultimately no code from this text was used, as IPython's system is a | |
19 | separate implementation). |
|
19 | separate implementation). | |
20 |
|
||||
21 | $Id: background_jobs.py 994 2006-01-08 08:29:44Z fperez $ |
|
|||
22 | """ |
|
20 | """ | |
23 |
|
21 | |||
24 | #***************************************************************************** |
|
22 | #***************************************************************************** | |
@@ -28,10 +26,6 b' $Id: background_jobs.py 994 2006-01-08 08:29:44Z fperez $' | |||||
28 | # the file COPYING, distributed as part of this software. |
|
26 | # the file COPYING, distributed as part of this software. | |
29 | #***************************************************************************** |
|
27 | #***************************************************************************** | |
30 |
|
28 | |||
31 | from IPython import Release |
|
|||
32 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
33 | __license__ = Release.license |
|
|||
34 |
|
||||
35 | # Code begins |
|
29 | # Code begins | |
36 | import sys |
|
30 | import sys | |
37 | import threading |
|
31 | import threading |
@@ -12,8 +12,7 b' Alternatively, you can add a dreload builtin alongside normal reload with:' | |||||
12 | >>> __builtin__.dreload = deep_reload.reload |
|
12 | >>> __builtin__.dreload = deep_reload.reload | |
13 |
|
13 | |||
14 | This code is almost entirely based on knee.py from the standard library. |
|
14 | This code is almost entirely based on knee.py from the standard library. | |
15 |
|
15 | """ | ||
16 | $Id: deep_reload.py 958 2005-12-27 23:17:51Z fperez $""" |
|
|||
17 |
|
16 | |||
18 | #***************************************************************************** |
|
17 | #***************************************************************************** | |
19 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> |
|
18 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> | |
@@ -22,12 +21,6 b' $Id: deep_reload.py 958 2005-12-27 23:17:51Z fperez $"""' | |||||
22 | # the file COPYING, distributed as part of this software. |
|
21 | # the file COPYING, distributed as part of this software. | |
23 | #***************************************************************************** |
|
22 | #***************************************************************************** | |
24 |
|
23 | |||
25 | from IPython import Release # do it explicitly so pydoc can see it - pydoc bug |
|
|||
26 | __author__ = '%s <%s>' % Release.authors['Nathan'] |
|
|||
27 | __license__ = Release.license |
|
|||
28 | __version__ = "0.5" |
|
|||
29 | __date__ = "21 August 2001" |
|
|||
30 |
|
||||
31 | import __builtin__ |
|
24 | import __builtin__ | |
32 | import imp |
|
25 | import imp | |
33 | import sys |
|
26 | import sys |
@@ -1,8 +1,7 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """ | |
3 | Color schemes for exception handling code in IPython. |
|
3 | Color schemes for exception handling code in IPython. | |
4 |
|
4 | """ | ||
5 | $Id: Prompts.py 638 2005-07-18 03:01:41Z fperez $""" |
|
|||
6 |
|
5 | |||
7 | #***************************************************************************** |
|
6 | #***************************************************************************** | |
8 | # Copyright (C) 2005-2006 Fernando Perez <fperez@colorado.edu> |
|
7 | # Copyright (C) 2005-2006 Fernando Perez <fperez@colorado.edu> | |
@@ -11,11 +10,6 b' $Id: Prompts.py 638 2005-07-18 03:01:41Z fperez $"""' | |||||
11 | # the file COPYING, distributed as part of this software. |
|
10 | # the file COPYING, distributed as part of this software. | |
12 | #***************************************************************************** |
|
11 | #***************************************************************************** | |
13 |
|
12 | |||
14 | from IPython import Release |
|
|||
15 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
16 | __license__ = Release.license |
|
|||
17 | __version__ = Release.version |
|
|||
18 |
|
||||
19 | #**************************************************************************** |
|
13 | #**************************************************************************** | |
20 | # Required modules |
|
14 | # Required modules | |
21 | from IPython.ColorANSI import ColorSchemeTable, TermColors, ColorScheme |
|
15 | from IPython.ColorANSI import ColorSchemeTable, TermColors, ColorScheme |
@@ -27,7 +27,7 b' how to do interpolation:' | |||||
27 | import Itpl |
|
27 | import Itpl | |
28 | sys.stdout = Itpl.filter() |
|
28 | sys.stdout = Itpl.filter() | |
29 | f = "fancy" |
|
29 | f = "fancy" | |
30 |
print "Is |
|
30 | print "Is this not $f?" | |
31 | print "Standard output has been replaced with a $sys.stdout object." |
|
31 | print "Standard output has been replaced with a $sys.stdout object." | |
32 | sys.stdout = Itpl.unfilter() |
|
32 | sys.stdout = Itpl.unfilter() | |
33 | print "Okay, back $to $normal." |
|
33 | print "Okay, back $to $normal." | |
@@ -43,9 +43,7 b' each time the instance is evaluated with str(instance). For example:' | |||||
43 | print str(s) |
|
43 | print str(s) | |
44 | foo = "bar" |
|
44 | foo = "bar" | |
45 | print str(s) |
|
45 | print str(s) | |
46 |
|
46 | """ | ||
47 | $Id: Itpl.py 2305 2007-05-04 05:34:42Z bgranger $ |
|
|||
48 | """ # ' -> close an open quote for stupid emacs |
|
|||
49 |
|
47 | |||
50 | #***************************************************************************** |
|
48 | #***************************************************************************** | |
51 | # |
|
49 | # |
@@ -1,11 +1,9 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """ |
|
2 | """General purpose utilities. | |
3 | General purpose utilities. |
|
|||
4 |
|
3 | |||
5 | This is a grab-bag of stuff I find useful in most programs I write. Some of |
|
4 | This is a grab-bag of stuff I find useful in most programs I write. Some of | |
6 | these things are also convenient when working at the command line. |
|
5 | these things are also convenient when working at the command line. | |
7 |
|
6 | """ | ||
8 | $Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $""" |
|
|||
9 |
|
7 | |||
10 | #***************************************************************************** |
|
8 | #***************************************************************************** | |
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
9 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> | |
@@ -14,10 +12,6 b' $Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $"""' | |||||
14 | # the file COPYING, distributed as part of this software. |
|
12 | # the file COPYING, distributed as part of this software. | |
15 | #***************************************************************************** |
|
13 | #***************************************************************************** | |
16 |
|
14 | |||
17 | from IPython import Release |
|
|||
18 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
19 | __license__ = Release.license |
|
|||
20 |
|
||||
21 | #**************************************************************************** |
|
15 | #**************************************************************************** | |
22 | # required modules from the Python standard library |
|
16 | # required modules from the Python standard library | |
23 | import __main__ |
|
17 | import __main__ |
@@ -31,8 +31,7 b" ip.set_hook('editor', calljed)" | |||||
31 |
|
31 | |||
32 | You can then enable the functionality by doing 'import myiphooks' |
|
32 | You can then enable the functionality by doing 'import myiphooks' | |
33 | somewhere in your configuration files or ipython command line. |
|
33 | somewhere in your configuration files or ipython command line. | |
34 |
|
34 | """ | ||
35 | $Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $""" |
|
|||
36 |
|
35 | |||
37 | #***************************************************************************** |
|
36 | #***************************************************************************** | |
38 | # Copyright (C) 2005 Fernando Perez. <fperez@colorado.edu> |
|
37 | # Copyright (C) 2005 Fernando Perez. <fperez@colorado.edu> | |
@@ -41,11 +40,7 b' $Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $"""' | |||||
41 | # the file COPYING, distributed as part of this software. |
|
40 | # the file COPYING, distributed as part of this software. | |
42 | #***************************************************************************** |
|
41 | #***************************************************************************** | |
43 |
|
42 | |||
44 | from IPython import Release |
|
|||
45 | from IPython import ipapi |
|
43 | from IPython import ipapi | |
46 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
47 | __license__ = Release.license |
|
|||
48 | __version__ = Release.version |
|
|||
49 |
|
44 | |||
50 | import os,bisect |
|
45 | import os,bisect | |
51 | from genutils import Term,shell |
|
46 | from genutils import Term,shell |
@@ -2,10 +2,9 b'' | |||||
2 | """ |
|
2 | """ | |
3 | IPython -- An enhanced Interactive Python |
|
3 | IPython -- An enhanced Interactive Python | |
4 |
|
4 | |||
5 |
Requires Python 2. |
|
5 | Requires Python 2.4 or newer. | |
6 |
|
6 | |||
7 | This file contains all the classes and helper functions specific to IPython. |
|
7 | This file contains all the classes and helper functions specific to IPython. | |
8 |
|
||||
9 | """ |
|
8 | """ | |
10 |
|
9 | |||
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
@@ -27,12 +26,6 b' This file contains all the classes and helper functions specific to IPython.' | |||||
27 | #**************************************************************************** |
|
26 | #**************************************************************************** | |
28 | # Modules and globals |
|
27 | # Modules and globals | |
29 |
|
28 | |||
30 | from IPython import Release |
|
|||
31 | __author__ = '%s <%s>\n%s <%s>' % \ |
|
|||
32 | ( Release.authors['Janko'] + Release.authors['Fernando'] ) |
|
|||
33 | __license__ = Release.license |
|
|||
34 | __version__ = Release.version |
|
|||
35 |
|
||||
36 | # Python standard modules |
|
29 | # Python standard modules | |
37 | import __main__ |
|
30 | import __main__ | |
38 | import __builtin__ |
|
31 | import __builtin__ |
@@ -5,8 +5,7 b' IPython -- An enhanced Interactive Python' | |||||
5 | Requires Python 2.1 or better. |
|
5 | Requires Python 2.1 or better. | |
6 |
|
6 | |||
7 | This file contains the main make_IPython() starter function. |
|
7 | This file contains the main make_IPython() starter function. | |
8 |
|
8 | """ | ||
9 | $Id: ipmaker.py 2930 2008-01-11 07:03:11Z vivainio $""" |
|
|||
10 |
|
9 | |||
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
12 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
|
11 | # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu> |
@@ -1,7 +1,6 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Mimic C structs with lots of extra functionality. |
|
2 | """Mimic C structs with lots of extra functionality. | |
3 |
|
3 | """ | ||
4 | $Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $""" |
|
|||
5 |
|
4 | |||
6 | #***************************************************************************** |
|
5 | #***************************************************************************** | |
7 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> |
|
6 | # Copyright (C) 2001-2004 Fernando Perez <fperez@colorado.edu> | |
@@ -10,10 +9,6 b' $Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $"""' | |||||
10 | # the file COPYING, distributed as part of this software. |
|
9 | # the file COPYING, distributed as part of this software. | |
11 | #***************************************************************************** |
|
10 | #***************************************************************************** | |
12 |
|
11 | |||
13 | from IPython import Release |
|
|||
14 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
15 | __license__ = Release.license |
|
|||
16 |
|
||||
17 | __all__ = ['Struct'] |
|
12 | __all__ = ['Struct'] | |
18 |
|
13 | |||
19 | import types |
|
14 | import types |
@@ -59,8 +59,7 b' ColorSchemeTable class. Currently the following exist:' | |||||
59 | You can implement other color schemes easily, the syntax is fairly |
|
59 | You can implement other color schemes easily, the syntax is fairly | |
60 | self-explanatory. Please send back new schemes you develop to the author for |
|
60 | self-explanatory. Please send back new schemes you develop to the author for | |
61 | possible inclusion in future releases. |
|
61 | possible inclusion in future releases. | |
62 |
|
62 | """ | ||
63 | $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" |
|
|||
64 |
|
63 | |||
65 | #***************************************************************************** |
|
64 | #***************************************************************************** | |
66 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> |
|
65 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> | |
@@ -70,11 +69,6 b' $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $"""' | |||||
70 | # the file COPYING, distributed as part of this software. |
|
69 | # the file COPYING, distributed as part of this software. | |
71 | #***************************************************************************** |
|
70 | #***************************************************************************** | |
72 |
|
71 | |||
73 | from IPython import Release |
|
|||
74 | __author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+ |
|
|||
75 | Release.authors['Fernando']) |
|
|||
76 | __license__ = Release.license |
|
|||
77 |
|
||||
78 | # Required modules |
|
72 | # Required modules | |
79 | import inspect |
|
73 | import inspect | |
80 | import keyword |
|
74 | import keyword |
@@ -9,7 +9,6 b'' | |||||
9 |
|
9 | |||
10 | import IPython.ipapi |
|
10 | import IPython.ipapi | |
11 |
|
11 | |||
12 |
|
||||
13 | from IPython.genutils import Term |
|
12 | from IPython.genutils import Term | |
14 | from IPython.ipapi import IPyAutocall |
|
13 | from IPython.ipapi import IPyAutocall | |
15 |
|
14 |
@@ -4,8 +4,7 b' A set of convenient utilities for numerical work.' | |||||
4 |
|
4 | |||
5 | Most of this module requires Numerical Python or is meant to be used with it. |
|
5 | Most of this module requires Numerical Python or is meant to be used with it. | |
6 | See http://www.pfdubois.com/numpy for details. |
|
6 | See http://www.pfdubois.com/numpy for details. | |
7 |
|
7 | """ | ||
8 | $Id: numutils.py 958 2005-12-27 23:17:51Z fperez $""" |
|
|||
9 |
|
8 | |||
10 | #***************************************************************************** |
|
9 | #***************************************************************************** | |
11 | # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu> |
|
10 | # Copyright (C) 2001-2005 Fernando Perez <fperez@colorado.edu> | |
@@ -14,10 +13,6 b' $Id: numutils.py 958 2005-12-27 23:17:51Z fperez $"""' | |||||
14 | # the file COPYING, distributed as part of this software. |
|
13 | # the file COPYING, distributed as part of this software. | |
15 | #***************************************************************************** |
|
14 | #***************************************************************************** | |
16 |
|
15 | |||
17 | from IPython import Release |
|
|||
18 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
19 | __license__ = Release.license |
|
|||
20 |
|
||||
21 | __all__ = ['sum_flat','mean_flat','rms_flat','base_repr','binary_repr', |
|
16 | __all__ = ['sum_flat','mean_flat','rms_flat','base_repr','binary_repr', | |
22 | 'amin','amax','amap','zeros_like','empty_like', |
|
17 | 'amin','amax','amap','zeros_like','empty_like', | |
23 | 'frange','diagonal_matrix','identity', |
|
18 | 'frange','diagonal_matrix','identity', |
@@ -12,7 +12,6 b' to use these functions in platform agnostic fashion.' | |||||
12 | # the file COPYING, distributed as part of this software. |
|
12 | # the file COPYING, distributed as part of this software. | |
13 | #***************************************************************************** |
|
13 | #***************************************************************************** | |
14 |
|
14 | |||
15 |
|
||||
16 | import os |
|
15 | import os | |
17 |
|
16 | |||
18 | ignore_termtitle = True |
|
17 | ignore_termtitle = True |
@@ -5,8 +5,7 b" Readline is used throughout IPython as 'import IPython.rlineimpl as readline'." | |||||
5 |
|
5 | |||
6 | In addition to normal readline stuff, this module provides have_readline |
|
6 | In addition to normal readline stuff, this module provides have_readline | |
7 | boolean and _outputfile variable used in genutils. |
|
7 | boolean and _outputfile variable used in genutils. | |
8 |
|
8 | """ | ||
9 | $Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $""" |
|
|||
10 |
|
9 | |||
11 | import sys |
|
10 | import sys | |
12 |
|
11 |
@@ -1,6 +1,13 b'' | |||||
1 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no |
|
1 | """Some globals used by the main Shell classes. | |
|
2 | """ | |||
|
3 | ||||
|
4 | #----------------------------------------------------------------------------- | |||
|
5 | # Module imports | |||
|
6 | #----------------------------------------------------------------------------- | |||
2 |
|
7 | |||
3 | import thread,inspect |
|
8 | # stdlib | |
|
9 | import inspect | |||
|
10 | import thread | |||
4 |
|
11 | |||
5 | try: |
|
12 | try: | |
6 | import ctypes |
|
13 | import ctypes | |
@@ -8,8 +15,12 b' try:' | |||||
8 | except ImportError: |
|
15 | except ImportError: | |
9 | HAS_CTYPES = False |
|
16 | HAS_CTYPES = False | |
10 |
|
17 | |||
|
18 | # our own | |||
|
19 | from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no | |||
11 |
|
20 | |||
|
21 | #----------------------------------------------------------------------------- | |||
12 | # Globals |
|
22 | # Globals | |
|
23 | #----------------------------------------------------------------------------- | |||
13 | # global flag to pass around information about Ctrl-C without exceptions |
|
24 | # global flag to pass around information about Ctrl-C without exceptions | |
14 | KBINT = False |
|
25 | KBINT = False | |
15 |
|
26 | |||
@@ -22,13 +33,11 b' MAIN_THREAD_ID = thread.get_ident()' | |||||
22 | # Tag when runcode() is active, for exception handling |
|
33 | # Tag when runcode() is active, for exception handling | |
23 | CODE_RUN = None |
|
34 | CODE_RUN = None | |
24 |
|
35 | |||
25 |
|
||||
26 | #----------------------------------------------------------------------------- |
|
36 | #----------------------------------------------------------------------------- | |
27 | # This class is trivial now, but I want to have it in to publish a clean |
|
37 | # This class is trivial now, but I want to have it in to publish a clean | |
28 | # interface. Later when the internals are reorganized, code that uses this |
|
38 | # interface. Later when the internals are reorganized, code that uses this | |
29 | # shouldn't have to change. |
|
39 | # shouldn't have to change. | |
30 |
|
40 | |||
31 |
|
||||
32 | if HAS_CTYPES: |
|
41 | if HAS_CTYPES: | |
33 | # Add async exception support. Trick taken from: |
|
42 | # Add async exception support. Trick taken from: | |
34 | # http://sebulba.wikispaces.com/recipe+thread2 |
|
43 | # http://sebulba.wikispaces.com/recipe+thread2 | |
@@ -81,16 +90,12 b' else:' | |||||
81 | # Set global flag so that runsource can know that Ctrl-C was hit |
|
90 | # Set global flag so that runsource can know that Ctrl-C was hit | |
82 | KBINT = True |
|
91 | KBINT = True | |
83 |
|
92 | |||
84 | def run_in_frontend(src): |
|
|||
85 | """ Check if source snippet can be run in the REPL thread, as opposed to GUI mainloop |
|
|||
86 |
|
||||
87 | (to prevent unnecessary hanging of mainloop). |
|
|||
88 |
|
93 | |||
|
94 | def run_in_frontend(src): | |||
|
95 | """ Check if source snippet can be run in the REPL thread, as opposed to | |||
|
96 | GUI mainloop (to prevent unnecessary hanging of mainloop). | |||
89 | """ |
|
97 | """ | |
90 |
|
98 | |||
91 | if src.startswith('_ip.system(') and not '\n' in src: |
|
99 | if src.startswith('_ip.system(') and not '\n' in src: | |
92 | return True |
|
100 | return True | |
93 | return False |
|
101 | return False | |
94 |
|
||||
95 |
|
||||
96 |
|
@@ -8,7 +8,6 b' import re' | |||||
8 | from IPython.hooks import CommandChainDispatcher |
|
8 | from IPython.hooks import CommandChainDispatcher | |
9 | import IPython.hooks |
|
9 | import IPython.hooks | |
10 |
|
10 | |||
11 |
|
||||
12 | # Code begins |
|
11 | # Code begins | |
13 | class StrDispatch(object): |
|
12 | class StrDispatch(object): | |
14 | """Dispatch (lookup) a set of strings / regexps for match. |
|
13 | """Dispatch (lookup) a set of strings / regexps for match. |
@@ -1,3 +1,7 b'' | |||||
|
1 | """Twisted shell support. | |||
|
2 | ||||
|
3 | XXX - This module is missing proper docs. | |||
|
4 | """ | |||
1 | import sys |
|
5 | import sys | |
2 |
|
6 | |||
3 | from twisted.internet import reactor, threads |
|
7 | from twisted.internet import reactor, threads |
@@ -59,8 +59,7 b' ColorSchemeTable class. Currently the following exist:' | |||||
59 | You can implement other color schemes easily, the syntax is fairly |
|
59 | You can implement other color schemes easily, the syntax is fairly | |
60 | self-explanatory. Please send back new schemes you develop to the author for |
|
60 | self-explanatory. Please send back new schemes you develop to the author for | |
61 | possible inclusion in future releases. |
|
61 | possible inclusion in future releases. | |
62 |
|
62 | """ | ||
63 | $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" |
|
|||
64 |
|
63 | |||
65 | #***************************************************************************** |
|
64 | #***************************************************************************** | |
66 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> |
|
65 | # Copyright (C) 2001 Nathaniel Gray <n8gray@caltech.edu> | |
@@ -70,11 +69,6 b' $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $"""' | |||||
70 | # the file COPYING, distributed as part of this software. |
|
69 | # the file COPYING, distributed as part of this software. | |
71 | #***************************************************************************** |
|
70 | #***************************************************************************** | |
72 |
|
71 | |||
73 | from IPython import Release |
|
|||
74 | __author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+ |
|
|||
75 | Release.authors['Fernando']) |
|
|||
76 | __license__ = Release.license |
|
|||
77 |
|
||||
78 | # Required modules |
|
72 | # Required modules | |
79 | import inspect |
|
73 | import inspect | |
80 | import keyword |
|
74 | import keyword |
@@ -6,13 +6,6 b'' | |||||
6 | # the file COPYING, distributed as part of this software. |
|
6 | # the file COPYING, distributed as part of this software. | |
7 | #***************************************************************************** |
|
7 | #***************************************************************************** | |
8 |
|
8 | |||
9 | # $Id: usage.py 2723 2007-09-07 07:44:16Z fperez $ |
|
|||
10 |
|
||||
11 | from IPython import Release |
|
|||
12 | __author__ = '%s <%s>' % Release.authors['Fernando'] |
|
|||
13 | __license__ = Release.license |
|
|||
14 | __version__ = Release.version |
|
|||
15 |
|
||||
16 | __doc__ = """ |
|
9 | __doc__ = """ | |
17 | IPython -- An enhanced Interactive Python |
|
10 | IPython -- An enhanced Interactive Python | |
18 | ========================================= |
|
11 | ========================================= | |
@@ -650,5 +643,3 b' or python names.' | |||||
650 | The following magic functions are currently available: |
|
643 | The following magic functions are currently available: | |
651 |
|
644 | |||
652 | """ |
|
645 | """ | |
653 |
|
||||
654 |
|
@@ -1,7 +1,5 b'' | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 | """Support for wildcard pattern matching in object inspection. |
|
2 | """Support for wildcard pattern matching in object inspection. | |
3 |
|
||||
4 | $Id: OInspect.py 608 2005-07-06 17:52:32Z fperez $ |
|
|||
5 | """ |
|
3 | """ | |
6 |
|
4 | |||
7 | #***************************************************************************** |
|
5 | #***************************************************************************** |
General Comments 0
You need to be logged in to leave comments.
Login now