##// END OF EJS Templates
Remove svn-style $Id marks from docstrings and Release imports....
Fernando Perez -
Show More
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Tools for coloring text in ANSI terminals.
3
4 $Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $"""
3 """
5 4
6 5 #*****************************************************************************
7 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 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 12 __all__ = ['TermColors','InputTermColors','ColorScheme','ColorSchemeTable']
18 13
19 14 import os
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Configuration loader
3
4 $Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $"""
3 """
5 4
6 5 #*****************************************************************************
7 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 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 12 import exceptions
18 13 import os
19 14 from pprint import pprint
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """sys.excepthook for IPython itself, leaves a detailed report on disk.
3
4 $Id: CrashHandler.py 2908 2007-12-30 21:07:46Z vivainio $"""
3 """
5 4
6 5 #*****************************************************************************
7 6 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -1,8 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """DPyGetOpt -- Demiurge Python GetOptions Module
3 3
4 $Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $
5
6 4 This module is modeled after perl's Getopt::Long module-- which
7 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 30 and -baz options that appear on within the parsed argument list
33 31 must have a real number argument and that the accumulated list
34 32 of values will be available under the name 'foo'
35
36 $Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $"""
33 """
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 13 changes. Licensing should therefore be under the standard Python terms. For
14 14 details on the PSF (Python Software Foundation) standard license, see:
15 15
16 http://www.python.org/2.2.3/license.html
17
18 $Id: Debugger.py 2913 2007-12-31 12:42:14Z vivainio $"""
16 http://www.python.org/2.2.3/license.html"""
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 28 import bdb
35 29 import cmd
36 30 import linecache
@@ -4,8 +4,7 b''
4 4 We define a special input line filter to allow typing lines which begin with
5 5 '~', '/' or '.'. If one of those strings is encountered, it is automatically
6 6 executed.
7
8 $Id: InterpreterExec.py 2724 2007-09-07 08:05:38Z fperez $"""
7 """
9 8
10 9 #*****************************************************************************
11 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 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 17 # TODO: deprecated
24 18 def prefilter_shell(self,line,continuation):
25 19 """Alternate prefilter, modified for shell-like functionality.
@@ -6,9 +6,6 b' Provides'
6 6 var = %magic blah blah
7 7
8 8 var = !ls
9
10 $Id: genutils.py 1077 2006-01-24 18:15:27Z vivainio $
11
12 9 """
13 10
14 11 import IPython.ipapi
@@ -3,8 +3,6 b''
3 3 %store magic for lightweight persistence.
4 4
5 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 8 import IPython.ipapi
@@ -4,8 +4,7 b' Class which mimics a module.'
4 4
5 5 Needed to allow pickle to correctly resolve namespaces during IPython
6 6 sessions.
7
8 $Id: FakeModule.py 2754 2007-09-09 10:16:59Z fperez $"""
7 """
9 8
10 9 #*****************************************************************************
11 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 12 Gnuplot, so it should be safe to do:
13 13
14 14 import IPython.Gnuplot2 as Gnuplot
15
16 $Id: Gnuplot2.py 1210 2006-03-13 01:19:31Z fperez $"""
15 """
17 16
18 17 import cStringIO
19 18 import os
@@ -9,8 +9,7 b' http://gnuplot-py.sourceforge.net/'
9 9 See gphelp() below for details on the services offered by this module.
10 10
11 11 Inspired by a suggestion/request from Arnd Baecker.
12
13 $Id: GnuplotInteractive.py 389 2004-10-09 07:59:30Z fperez $"""
12 """
14 13
15 14 __all__ = ['Gnuplot','gp','gp_new','plot','plot2','splot','replot',
16 15 'hardcopy','gpdata','gpfile','gpstring','gpfunc','gpgrid',
@@ -47,8 +47,7 b' can be downloaded from:'
47 47 http://gnuplot-py.sourceforge.net/
48 48
49 49 Inspired by a suggestion/request from Arnd Baecker.
50
51 $Id: GnuplotRuntime.py 389 2004-10-09 07:59:30Z fperez $"""
50 """
52 51
53 52 __all__ = ['Gnuplot','gp','gp_new','Data','File','Func','GridData',
54 53 'pm3d_config','eps_fix_bbox']
@@ -27,7 +27,7 b' how to do interpolation:'
27 27 import Itpl
28 28 sys.stdout = Itpl.filter()
29 29 f = "fancy"
30 print "Isn't this $f?"
30 print "Is this not $f?"
31 31 print "Standard output has been replaced with a $sys.stdout object."
32 32 sys.stdout = Itpl.unfilter()
33 33 print "Okay, back $to $normal."
@@ -43,9 +43,7 b' each time the instance is evaluated with str(instance). For example:'
43 43 print str(s)
44 44 foo = "bar"
45 45 print str(s)
46
47 $Id: Itpl.py 2918 2007-12-31 14:34:47Z vivainio $
48 """ # ' -> close an open quote for stupid emacs
46 """
49 47
50 48 #*****************************************************************************
51 49 #
@@ -1,8 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 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 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 17 # Python standard modules
25 18 import glob
26 19 import os
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Magic functions for InteractiveShell.
3
4 $Id: Magic.py 2996 2008-01-30 06:31:39Z fperez $"""
3 """
5 4
6 5 #*****************************************************************************
7 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 6 Similar in spirit to the inspect module, but all calls take a name argument to
7 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 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 17 __all__ = ['Inspector','InspectColors']
24 18
25 19 # stdlib modules
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Class to trap stdout and stderr and log them separately.
3
4 $Id: OutputTrap.py 958 2005-12-27 23:17:51Z fperez $"""
3 """
5 4
6 5 #*****************************************************************************
7 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 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 12 import exceptions
18 13 import sys
19 14 from cStringIO import StringIO
@@ -1,8 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 3 Classes for handling input/output prompts.
4
5 $Id: Prompts.py 3026 2008-02-07 16:03:16Z vivainio $"""
4 """
6 5
7 6 #*****************************************************************************
8 7 # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
@@ -1,34 +1,33 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 Class and program to colorize python source code for ANSI terminals.
3 Class and program to colorize python source code for ANSI terminals.
4 4
5 Based on an HTML code highlighter by Jurgen Hermann found at:
6 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298
5 Based on an HTML code highlighter by Jurgen Hermann found at:
6 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298
7 7
8 Modifications by Fernando Perez (fperez@colorado.edu).
8 Modifications by Fernando Perez (fperez@colorado.edu).
9 9
10 Information on the original HTML highlighter follows:
11
12 MoinMoin - Python Source Parser
10 Information on the original HTML highlighter follows:
13 11
14 Title: Colorize Python source using the built-in tokenizer
15
16 Submitter: Jurgen Hermann
17 Last Updated:2001/04/06
18
19 Version no:1.2
12 MoinMoin - Python Source Parser
20 13
21 Description:
14 Title: Colorize Python source using the built-in tokenizer
22 15
23 This code is part of MoinMoin (http://moin.sourceforge.net/) and converts
24 Python source code to HTML markup, rendering comments, keywords,
25 operators, numeric and string literals in different colors.
16 Submitter: Jurgen Hermann
17 Last Updated:2001/04/06
26 18
27 It shows how to use the built-in keyword, token and tokenize modules to
28 scan Python source code and re-emit it with no changes to its original
29 formatting (which is the hard part).
19 Version no:1.2
30 20
31 $Id: PyColorize.py 2586 2007-08-06 19:30:09Z vivainio $"""
21 Description:
22
23 This code is part of MoinMoin (http://moin.sourceforge.net/) and converts
24 Python source code to HTML markup, rendering comments, keywords,
25 operators, numeric and string literals in different colors.
26
27 It shows how to use the built-in keyword, token and tokenize modules to
28 scan Python source code and re-emit it with no changes to its original
29 formatting (which is the hard part).
30 """
32 31
33 32 __all__ = ['ANSICodeColors','Parser']
34 33
@@ -3,8 +3,7 b''
3 3
4 4 All the matplotlib support code was co-developed with John Hunter,
5 5 matplotlib's author.
6
7 $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $"""
6 """
8 7
9 8 #*****************************************************************************
10 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 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 15 # Code begins
21 16 # Stdlib imports
22 17 import __builtin__
@@ -25,9 +25,8 b' IPython tries to:'
25 25
26 26 iii - serve as an embeddable, ready to go interpreter for your own programs.
27 27
28 IPython requires Python 2.3 or newer.
29
30 $Id: __init__.py 2399 2007-05-26 10:23:10Z vivainio $"""
28 IPython requires Python 2.4 or newer.
29 """
31 30
32 31 #*****************************************************************************
33 32 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -17,8 +17,6 b' http://folk.uio.no/hpl/scripting'
17 17
18 18 (although ultimately no code from this text was used, as IPython's system is a
19 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 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 29 # Code begins
36 30 import sys
37 31 import threading
@@ -12,8 +12,7 b' Alternatively, you can add a dreload builtin alongside normal reload with:'
12 12 >>> __builtin__.dreload = deep_reload.reload
13 13
14 14 This code is almost entirely based on knee.py from the standard library.
15
16 $Id: deep_reload.py 958 2005-12-27 23:17:51Z fperez $"""
15 """
17 16
18 17 #*****************************************************************************
19 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 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 24 import __builtin__
32 25 import imp
33 26 import sys
@@ -1,8 +1,7 b''
1 1 # -*- coding: utf-8 -*-
2 2 """
3 3 Color schemes for exception handling code in IPython.
4
5 $Id: Prompts.py 638 2005-07-18 03:01:41Z fperez $"""
4 """
6 5
7 6 #*****************************************************************************
8 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 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 14 # Required modules
21 15 from IPython.ColorANSI import ColorSchemeTable, TermColors, ColorScheme
@@ -27,7 +27,7 b' how to do interpolation:'
27 27 import Itpl
28 28 sys.stdout = Itpl.filter()
29 29 f = "fancy"
30 print "Isn't this $f?"
30 print "Is this not $f?"
31 31 print "Standard output has been replaced with a $sys.stdout object."
32 32 sys.stdout = Itpl.unfilter()
33 33 print "Okay, back $to $normal."
@@ -43,9 +43,7 b' each time the instance is evaluated with str(instance). For example:'
43 43 print str(s)
44 44 foo = "bar"
45 45 print str(s)
46
47 $Id: Itpl.py 2305 2007-05-04 05:34:42Z bgranger $
48 """ # ' -> close an open quote for stupid emacs
46 """
49 47
50 48 #*****************************************************************************
51 49 #
@@ -1,11 +1,9 b''
1 1 # -*- coding: utf-8 -*-
2 """
3 General purpose utilities.
2 """General purpose utilities.
4 3
5 4 This is a grab-bag of stuff I find useful in most programs I write. Some of
6 5 these things are also convenient when working at the command line.
7
8 $Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $"""
6 """
9 7
10 8 #*****************************************************************************
11 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 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 16 # required modules from the Python standard library
23 17 import __main__
@@ -31,8 +31,7 b" ip.set_hook('editor', calljed)"
31 31
32 32 You can then enable the functionality by doing 'import myiphooks'
33 33 somewhere in your configuration files or ipython command line.
34
35 $Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $"""
34 """
36 35
37 36 #*****************************************************************************
38 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 40 # the file COPYING, distributed as part of this software.
42 41 #*****************************************************************************
43 42
44 from IPython import Release
45 43 from IPython import ipapi
46 __author__ = '%s <%s>' % Release.authors['Fernando']
47 __license__ = Release.license
48 __version__ = Release.version
49 44
50 45 import os,bisect
51 46 from genutils import Term,shell
@@ -2,10 +2,9 b''
2 2 """
3 3 IPython -- An enhanced Interactive Python
4 4
5 Requires Python 2.3 or newer.
5 Requires Python 2.4 or newer.
6 6
7 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 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 29 # Python standard modules
37 30 import __main__
38 31 import __builtin__
@@ -5,8 +5,7 b' IPython -- An enhanced Interactive Python'
5 5 Requires Python 2.1 or better.
6 6
7 7 This file contains the main make_IPython() starter function.
8
9 $Id: ipmaker.py 2930 2008-01-11 07:03:11Z vivainio $"""
8 """
10 9
11 10 #*****************************************************************************
12 11 # Copyright (C) 2001-2006 Fernando Perez. <fperez@colorado.edu>
@@ -1,7 +1,6 b''
1 1 # -*- coding: utf-8 -*-
2 2 """Mimic C structs with lots of extra functionality.
3
4 $Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $"""
3 """
5 4
6 5 #*****************************************************************************
7 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 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 12 __all__ = ['Struct']
18 13
19 14 import types
@@ -59,8 +59,7 b' ColorSchemeTable class. Currently the following exist:'
59 59 You can implement other color schemes easily, the syntax is fairly
60 60 self-explanatory. Please send back new schemes you develop to the author for
61 61 possible inclusion in future releases.
62
63 $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $"""
62 """
64 63
65 64 #*****************************************************************************
66 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 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 72 # Required modules
79 73 import inspect
80 74 import keyword
@@ -9,7 +9,6 b''
9 9
10 10 import IPython.ipapi
11 11
12
13 12 from IPython.genutils import Term
14 13 from IPython.ipapi import IPyAutocall
15 14
@@ -41,4 +40,4 b' class Macro(IPyAutocall):'
41 40
42 41 def __getstate__(self):
43 42 """ needed for safe pickling via %store """
44 return {'value': self.value} No newline at end of file
43 return {'value': self.value}
@@ -4,8 +4,7 b' A set of convenient utilities for numerical work.'
4 4
5 5 Most of this module requires Numerical Python or is meant to be used with it.
6 6 See http://www.pfdubois.com/numpy for details.
7
8 $Id: numutils.py 958 2005-12-27 23:17:51Z fperez $"""
7 """
9 8
10 9 #*****************************************************************************
11 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 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 16 __all__ = ['sum_flat','mean_flat','rms_flat','base_repr','binary_repr',
22 17 'amin','amax','amap','zeros_like','empty_like',
23 18 'frange','diagonal_matrix','identity',
@@ -12,7 +12,6 b' to use these functions in platform agnostic fashion.'
12 12 # the file COPYING, distributed as part of this software.
13 13 #*****************************************************************************
14 14
15
16 15 import os
17 16
18 17 ignore_termtitle = True
@@ -5,8 +5,7 b" Readline is used throughout IPython as 'import IPython.rlineimpl as readline'."
5 5
6 6 In addition to normal readline stuff, this module provides have_readline
7 7 boolean and _outputfile variable used in genutils.
8
9 $Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $"""
8 """
10 9
11 10 import sys
12 11
@@ -53,4 +52,4 b' if have_readline:'
53 52 _rl.clear_history
54 53 except AttributeError:
55 54 def clear_history(): pass
56 _rl.clear_history = clear_history No newline at end of file
55 _rl.clear_history = clear_history
@@ -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 12 try:
6 13 import ctypes
@@ -8,8 +15,12 b' try:'
8 15 except ImportError:
9 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 22 # Globals
23 #-----------------------------------------------------------------------------
13 24 # global flag to pass around information about Ctrl-C without exceptions
14 25 KBINT = False
15 26
@@ -22,13 +33,11 b' MAIN_THREAD_ID = thread.get_ident()'
22 33 # Tag when runcode() is active, for exception handling
23 34 CODE_RUN = None
24 35
25
26 36 #-----------------------------------------------------------------------------
27 37 # This class is trivial now, but I want to have it in to publish a clean
28 38 # interface. Later when the internals are reorganized, code that uses this
29 39 # shouldn't have to change.
30 40
31
32 41 if HAS_CTYPES:
33 42 # Add async exception support. Trick taken from:
34 43 # http://sebulba.wikispaces.com/recipe+thread2
@@ -81,16 +90,12 b' else:'
81 90 # Set global flag so that runsource can know that Ctrl-C was hit
82 91 KBINT = True
83 92
93
84 94 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
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 99 if src.startswith('_ip.system(') and not '\n' in src:
92 100 return True
93 101 return False
94
95
96
@@ -8,7 +8,6 b' import re'
8 8 from IPython.hooks import CommandChainDispatcher
9 9 import IPython.hooks
10 10
11
12 11 # Code begins
13 12 class StrDispatch(object):
14 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 5 import sys
2 6
3 7 from twisted.internet import reactor, threads
@@ -59,8 +59,7 b' ColorSchemeTable class. Currently the following exist:'
59 59 You can implement other color schemes easily, the syntax is fairly
60 60 self-explanatory. Please send back new schemes you develop to the author for
61 61 possible inclusion in future releases.
62
63 $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $"""
62 """
64 63
65 64 #*****************************************************************************
66 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 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 72 # Required modules
79 73 import inspect
80 74 import keyword
@@ -6,13 +6,6 b''
6 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 9 __doc__ = """
17 10 IPython -- An enhanced Interactive Python
18 11 =========================================
@@ -650,5 +643,3 b' or python names.'
650 643 The following magic functions are currently available:
651 644
652 645 """
653
654
@@ -1,7 +1,5 b''
1 1 # -*- coding: utf-8 -*-
2 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