From b8f5152cc9df2cbf981a530ae7fb771bd652c5c2 2009-03-11 06:53:19 From: Fernando Perez Date: 2009-03-11 06:53:19 Subject: [PATCH] Remove svn-style $Id marks from docstrings and Release imports. The Id marks show up as junk in the API docs (and they were outdated anyway, since we now use bzr). The Release imports were in there for pulling author/license information for epydoc, but now with sphinx they aren't necessary, and they just are extra startup work. --- diff --git a/IPython/ColorANSI.py b/IPython/ColorANSI.py index fbf9573..783aa1d 100644 --- a/IPython/ColorANSI.py +++ b/IPython/ColorANSI.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Tools for coloring text in ANSI terminals. - -$Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2002-2006 Fernando Perez. @@ -10,10 +9,6 @@ $Id: ColorANSI.py 2167 2007-03-21 06:57:50Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - __all__ = ['TermColors','InputTermColors','ColorScheme','ColorSchemeTable'] import os diff --git a/IPython/ConfigLoader.py b/IPython/ConfigLoader.py index 2d3c30c..d64864d 100644 --- a/IPython/ConfigLoader.py +++ b/IPython/ConfigLoader.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Configuration loader - -$Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. @@ -10,10 +9,6 @@ $Id: ConfigLoader.py 1005 2006-01-12 08:39:26Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - import exceptions import os from pprint import pprint diff --git a/IPython/CrashHandler.py b/IPython/CrashHandler.py index 857abe5..247ba74 100644 --- a/IPython/CrashHandler.py +++ b/IPython/CrashHandler.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """sys.excepthook for IPython itself, leaves a detailed report on disk. - -$Id: CrashHandler.py 2908 2007-12-30 21:07:46Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. diff --git a/IPython/DPyGetOpt.py b/IPython/DPyGetOpt.py index dd2cf86..f4b918e 100644 --- a/IPython/DPyGetOpt.py +++ b/IPython/DPyGetOpt.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- """DPyGetOpt -- Demiurge Python GetOptions Module - $Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $ - This module is modeled after perl's Getopt::Long module-- which is, in turn, modeled after GNU's extended getopt() function. @@ -32,8 +30,7 @@ characters; ie-- 'foo|bar|baz=f@' specifies that all -foo, -bar, and -baz options that appear on within the parsed argument list must have a real number argument and that the accumulated list of values will be available under the name 'foo' - -$Id: DPyGetOpt.py 2872 2007-11-25 17:58:05Z fperez $""" +""" #***************************************************************************** # diff --git a/IPython/Debugger.py b/IPython/Debugger.py index cd68034..117b7d1 100644 --- a/IPython/Debugger.py +++ b/IPython/Debugger.py @@ -13,9 +13,7 @@ The code in this file is mainly lifted out of cmd.py in Python 2.2, with minor changes. Licensing should therefore be under the standard Python terms. For details on the PSF (Python Software Foundation) standard license, see: -http://www.python.org/2.2.3/license.html - -$Id: Debugger.py 2913 2007-12-31 12:42:14Z vivainio $""" +http://www.python.org/2.2.3/license.html""" #***************************************************************************** # @@ -27,10 +25,6 @@ $Id: Debugger.py 2913 2007-12-31 12:42:14Z vivainio $""" # #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = 'Python' - import bdb import cmd import linecache diff --git a/IPython/Extensions/InterpreterExec.py b/IPython/Extensions/InterpreterExec.py index a35dceb..cca7c24 100644 --- a/IPython/Extensions/InterpreterExec.py +++ b/IPython/Extensions/InterpreterExec.py @@ -4,8 +4,7 @@ We define a special input line filter to allow typing lines which begin with '~', '/' or '.'. If one of those strings is encountered, it is automatically executed. - -$Id: InterpreterExec.py 2724 2007-09-07 08:05:38Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2004 W.J. van der Laan @@ -15,11 +14,6 @@ $Id: InterpreterExec.py 2724 2007-09-07 08:05:38Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = 'W.J. van der Laan , '\ - '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - # TODO: deprecated def prefilter_shell(self,line,continuation): """Alternate prefilter, modified for shell-like functionality. diff --git a/IPython/Extensions/ext_rescapture.py b/IPython/Extensions/ext_rescapture.py index eae7cb9..e02b232 100644 --- a/IPython/Extensions/ext_rescapture.py +++ b/IPython/Extensions/ext_rescapture.py @@ -6,9 +6,6 @@ Provides var = %magic blah blah var = !ls - -$Id: genutils.py 1077 2006-01-24 18:15:27Z vivainio $ - """ import IPython.ipapi diff --git a/IPython/Extensions/pspersistence.py b/IPython/Extensions/pspersistence.py index 7636493..563308d 100644 --- a/IPython/Extensions/pspersistence.py +++ b/IPython/Extensions/pspersistence.py @@ -3,8 +3,6 @@ %store magic for lightweight persistence. Stores variables, aliases etc. in PickleShare database. - -$Id: iplib.py 1107 2006-01-30 19:02:20Z vivainio $ """ import IPython.ipapi diff --git a/IPython/FakeModule.py b/IPython/FakeModule.py index 9905d52..cc53d99 100644 --- a/IPython/FakeModule.py +++ b/IPython/FakeModule.py @@ -4,8 +4,7 @@ Class which mimics a module. Needed to allow pickle to correctly resolve namespaces during IPython sessions. - -$Id: FakeModule.py 2754 2007-09-09 10:16:59Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2002-2004 Fernando Perez. diff --git a/IPython/Gnuplot2.py b/IPython/Gnuplot2.py index 5019312..cc2eb17 100644 --- a/IPython/Gnuplot2.py +++ b/IPython/Gnuplot2.py @@ -12,8 +12,7 @@ This module is meant to be used as a drop-in replacement to the original Gnuplot, so it should be safe to do: import IPython.Gnuplot2 as Gnuplot - -$Id: Gnuplot2.py 1210 2006-03-13 01:19:31Z fperez $""" +""" import cStringIO import os diff --git a/IPython/GnuplotInteractive.py b/IPython/GnuplotInteractive.py index 0e99ba6..074d2f5 100644 --- a/IPython/GnuplotInteractive.py +++ b/IPython/GnuplotInteractive.py @@ -9,8 +9,7 @@ http://gnuplot-py.sourceforge.net/ See gphelp() below for details on the services offered by this module. Inspired by a suggestion/request from Arnd Baecker. - -$Id: GnuplotInteractive.py 389 2004-10-09 07:59:30Z fperez $""" +""" __all__ = ['Gnuplot','gp','gp_new','plot','plot2','splot','replot', 'hardcopy','gpdata','gpfile','gpstring','gpfunc','gpgrid', diff --git a/IPython/GnuplotRuntime.py b/IPython/GnuplotRuntime.py index 1e99dba..8bd5185 100644 --- a/IPython/GnuplotRuntime.py +++ b/IPython/GnuplotRuntime.py @@ -47,8 +47,7 @@ can be downloaded from: http://gnuplot-py.sourceforge.net/ Inspired by a suggestion/request from Arnd Baecker. - -$Id: GnuplotRuntime.py 389 2004-10-09 07:59:30Z fperez $""" +""" __all__ = ['Gnuplot','gp','gp_new','Data','File','Func','GridData', 'pm3d_config','eps_fix_bbox'] diff --git a/IPython/Itpl.py b/IPython/Itpl.py index 0003e30..7deba81 100644 --- a/IPython/Itpl.py +++ b/IPython/Itpl.py @@ -27,7 +27,7 @@ how to do interpolation: import Itpl sys.stdout = Itpl.filter() f = "fancy" - print "Isn't this $f?" + print "Is this not $f?" print "Standard output has been replaced with a $sys.stdout object." sys.stdout = Itpl.unfilter() print "Okay, back $to $normal." @@ -43,9 +43,7 @@ each time the instance is evaluated with str(instance). For example: print str(s) foo = "bar" print str(s) - -$Id: Itpl.py 2918 2007-12-31 14:34:47Z vivainio $ -""" # ' -> close an open quote for stupid emacs +""" #***************************************************************************** # diff --git a/IPython/Logger.py b/IPython/Logger.py index 8c936ee..be7bd7b 100644 --- a/IPython/Logger.py +++ b/IPython/Logger.py @@ -1,8 +1,6 @@ # -*- coding: utf-8 -*- """ Logger class for IPython's logging facilities. - -$Id: Logger.py 2875 2007-11-26 08:37:39Z fperez $ """ #***************************************************************************** @@ -16,11 +14,6 @@ $Id: Logger.py 2875 2007-11-26 08:37:39Z fperez $ #**************************************************************************** # Modules and globals -from IPython import Release -__author__ = '%s <%s>\n%s <%s>' % \ - ( Release.authors['Janko'] + Release.authors['Fernando'] ) -__license__ = Release.license - # Python standard modules import glob import os diff --git a/IPython/Magic.py b/IPython/Magic.py index 16cfc56..aa188b6 100644 --- a/IPython/Magic.py +++ b/IPython/Magic.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Magic functions for InteractiveShell. - -$Id: Magic.py 2996 2008-01-30 06:31:39Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2001 Janko Hauser and diff --git a/IPython/OInspect.py b/IPython/OInspect.py index 83cf3a0..ecef640 100644 --- a/IPython/OInspect.py +++ b/IPython/OInspect.py @@ -5,8 +5,6 @@ Uses syntax highlighting for presenting the various information elements. Similar in spirit to the inspect module, but all calls take a name argument to reference the name under which an object is being read. - -$Id: OInspect.py 2843 2007-10-15 21:22:32Z fperez $ """ #***************************************************************************** @@ -16,10 +14,6 @@ $Id: OInspect.py 2843 2007-10-15 21:22:32Z fperez $ # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - __all__ = ['Inspector','InspectColors'] # stdlib modules diff --git a/IPython/OutputTrap.py b/IPython/OutputTrap.py index d60216a..c63c798 100644 --- a/IPython/OutputTrap.py +++ b/IPython/OutputTrap.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Class to trap stdout and stderr and log them separately. - -$Id: OutputTrap.py 958 2005-12-27 23:17:51Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2001-2004 Fernando Perez @@ -10,10 +9,6 @@ $Id: OutputTrap.py 958 2005-12-27 23:17:51Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - import exceptions import sys from cStringIO import StringIO diff --git a/IPython/Prompts.py b/IPython/Prompts.py index df4030d..1c3bee4 100644 --- a/IPython/Prompts.py +++ b/IPython/Prompts.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- """ Classes for handling input/output prompts. - -$Id: Prompts.py 3026 2008-02-07 16:03:16Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez diff --git a/IPython/PyColorize.py b/IPython/PyColorize.py index 74accae..7d463ea 100644 --- a/IPython/PyColorize.py +++ b/IPython/PyColorize.py @@ -1,34 +1,33 @@ # -*- coding: utf-8 -*- """ - Class and program to colorize python source code for ANSI terminals. +Class and program to colorize python source code for ANSI terminals. - Based on an HTML code highlighter by Jurgen Hermann found at: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298 +Based on an HTML code highlighter by Jurgen Hermann found at: +http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298 - Modifications by Fernando Perez (fperez@colorado.edu). +Modifications by Fernando Perez (fperez@colorado.edu). - Information on the original HTML highlighter follows: - - MoinMoin - Python Source Parser +Information on the original HTML highlighter follows: - Title: Colorize Python source using the built-in tokenizer - - Submitter: Jurgen Hermann - Last Updated:2001/04/06 - - Version no:1.2 +MoinMoin - Python Source Parser - Description: +Title: Colorize Python source using the built-in tokenizer - This code is part of MoinMoin (http://moin.sourceforge.net/) and converts - Python source code to HTML markup, rendering comments, keywords, - operators, numeric and string literals in different colors. +Submitter: Jurgen Hermann +Last Updated:2001/04/06 - It shows how to use the built-in keyword, token and tokenize modules to - scan Python source code and re-emit it with no changes to its original - formatting (which is the hard part). +Version no:1.2 - $Id: PyColorize.py 2586 2007-08-06 19:30:09Z vivainio $""" +Description: + +This code is part of MoinMoin (http://moin.sourceforge.net/) and converts +Python source code to HTML markup, rendering comments, keywords, +operators, numeric and string literals in different colors. + +It shows how to use the built-in keyword, token and tokenize modules to +scan Python source code and re-emit it with no changes to its original +formatting (which is the hard part). +""" __all__ = ['ANSICodeColors','Parser'] diff --git a/IPython/Shell.py b/IPython/Shell.py index 9023fe6..59c8599 100644 --- a/IPython/Shell.py +++ b/IPython/Shell.py @@ -3,8 +3,7 @@ All the matplotlib support code was co-developed with John Hunter, matplotlib's author. - -$Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez @@ -13,10 +12,6 @@ $Id: Shell.py 3024 2008-02-07 15:34:42Z darren.dale $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - # Code begins # Stdlib imports import __builtin__ diff --git a/IPython/__init__.py b/IPython/__init__.py index 48c95af..e0fd6f4 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -25,9 +25,8 @@ IPython tries to: iii - serve as an embeddable, ready to go interpreter for your own programs. -IPython requires Python 2.3 or newer. - -$Id: __init__.py 2399 2007-05-26 10:23:10Z vivainio $""" +IPython requires Python 2.4 or newer. +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. diff --git a/IPython/background_jobs.py b/IPython/background_jobs.py index c9c3aa3..e418aaa 100644 --- a/IPython/background_jobs.py +++ b/IPython/background_jobs.py @@ -17,8 +17,6 @@ http://folk.uio.no/hpl/scripting (although ultimately no code from this text was used, as IPython's system is a separate implementation). - -$Id: background_jobs.py 994 2006-01-08 08:29:44Z fperez $ """ #***************************************************************************** @@ -28,10 +26,6 @@ $Id: background_jobs.py 994 2006-01-08 08:29:44Z fperez $ # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - # Code begins import sys import threading diff --git a/IPython/deep_reload.py b/IPython/deep_reload.py index f578de2..c8685ba 100644 --- a/IPython/deep_reload.py +++ b/IPython/deep_reload.py @@ -12,8 +12,7 @@ Alternatively, you can add a dreload builtin alongside normal reload with: >>> __builtin__.dreload = deep_reload.reload This code is almost entirely based on knee.py from the standard library. - -$Id: deep_reload.py 958 2005-12-27 23:17:51Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2001 Nathaniel Gray @@ -22,12 +21,6 @@ $Id: deep_reload.py 958 2005-12-27 23:17:51Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release # do it explicitly so pydoc can see it - pydoc bug -__author__ = '%s <%s>' % Release.authors['Nathan'] -__license__ = Release.license -__version__ = "0.5" -__date__ = "21 August 2001" - import __builtin__ import imp import sys diff --git a/IPython/excolors.py b/IPython/excolors.py index d266715..23f2677 100644 --- a/IPython/excolors.py +++ b/IPython/excolors.py @@ -1,8 +1,7 @@ # -*- coding: utf-8 -*- """ Color schemes for exception handling code in IPython. - -$Id: Prompts.py 638 2005-07-18 03:01:41Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2005-2006 Fernando Perez @@ -11,11 +10,6 @@ $Id: Prompts.py 638 2005-07-18 03:01:41Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license -__version__ = Release.version - #**************************************************************************** # Required modules from IPython.ColorANSI import ColorSchemeTable, TermColors, ColorScheme diff --git a/IPython/external/Itpl.py b/IPython/external/Itpl.py index e792cc0..3423fe4 100644 --- a/IPython/external/Itpl.py +++ b/IPython/external/Itpl.py @@ -27,7 +27,7 @@ how to do interpolation: import Itpl sys.stdout = Itpl.filter() f = "fancy" - print "Isn't this $f?" + print "Is this not $f?" print "Standard output has been replaced with a $sys.stdout object." sys.stdout = Itpl.unfilter() print "Okay, back $to $normal." @@ -43,9 +43,7 @@ each time the instance is evaluated with str(instance). For example: print str(s) foo = "bar" print str(s) - -$Id: Itpl.py 2305 2007-05-04 05:34:42Z bgranger $ -""" # ' -> close an open quote for stupid emacs +""" #***************************************************************************** # diff --git a/IPython/genutils.py b/IPython/genutils.py index 0606842..a9590d2 100644 --- a/IPython/genutils.py +++ b/IPython/genutils.py @@ -1,11 +1,9 @@ # -*- coding: utf-8 -*- -""" -General purpose utilities. +"""General purpose utilities. This is a grab-bag of stuff I find useful in most programs I write. Some of these things are also convenient when working at the command line. - -$Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. @@ -14,10 +12,6 @@ $Id: genutils.py 2998 2008-01-31 10:06:04Z vivainio $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - #**************************************************************************** # required modules from the Python standard library import __main__ diff --git a/IPython/hooks.py b/IPython/hooks.py index 6a67264..5dcade6 100644 --- a/IPython/hooks.py +++ b/IPython/hooks.py @@ -31,8 +31,7 @@ ip.set_hook('editor', calljed) You can then enable the functionality by doing 'import myiphooks' somewhere in your configuration files or ipython command line. - -$Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2005 Fernando Perez. @@ -41,11 +40,7 @@ $Id: hooks.py 2998 2008-01-31 10:06:04Z vivainio $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release from IPython import ipapi -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license -__version__ = Release.version import os,bisect from genutils import Term,shell diff --git a/IPython/iplib.py b/IPython/iplib.py index 34195b6..cf05a76 100644 --- a/IPython/iplib.py +++ b/IPython/iplib.py @@ -2,10 +2,9 @@ """ IPython -- An enhanced Interactive Python -Requires Python 2.3 or newer. +Requires Python 2.4 or newer. This file contains all the classes and helper functions specific to IPython. - """ #***************************************************************************** @@ -27,12 +26,6 @@ This file contains all the classes and helper functions specific to IPython. #**************************************************************************** # Modules and globals -from IPython import Release -__author__ = '%s <%s>\n%s <%s>' % \ - ( Release.authors['Janko'] + Release.authors['Fernando'] ) -__license__ = Release.license -__version__ = Release.version - # Python standard modules import __main__ import __builtin__ diff --git a/IPython/ipmaker.py b/IPython/ipmaker.py index 6065535..9ed6408 100644 --- a/IPython/ipmaker.py +++ b/IPython/ipmaker.py @@ -5,8 +5,7 @@ IPython -- An enhanced Interactive Python Requires Python 2.1 or better. This file contains the main make_IPython() starter function. - -$Id: ipmaker.py 2930 2008-01-11 07:03:11Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001-2006 Fernando Perez. diff --git a/IPython/ipstruct.py b/IPython/ipstruct.py index e3af2ee..ef11c47 100644 --- a/IPython/ipstruct.py +++ b/IPython/ipstruct.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Mimic C structs with lots of extra functionality. - -$Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001-2004 Fernando Perez @@ -10,10 +9,6 @@ $Id: ipstruct.py 1950 2006-11-28 19:15:35Z vivainio $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - __all__ = ['Struct'] import types diff --git a/IPython/kernel/core/ultraTB.py b/IPython/kernel/core/ultraTB.py index 7d1b1b6..a11a0eb 100644 --- a/IPython/kernel/core/ultraTB.py +++ b/IPython/kernel/core/ultraTB.py @@ -59,8 +59,7 @@ ColorSchemeTable class. Currently the following exist: You can implement other color schemes easily, the syntax is fairly self-explanatory. Please send back new schemes you develop to the author for possible inclusion in future releases. - -$Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001 Nathaniel Gray @@ -70,11 +69,6 @@ $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+ - Release.authors['Fernando']) -__license__ = Release.license - # Required modules import inspect import keyword diff --git a/IPython/macro.py b/IPython/macro.py index e28ffae..30cf4fb 100644 --- a/IPython/macro.py +++ b/IPython/macro.py @@ -9,7 +9,6 @@ import IPython.ipapi - from IPython.genutils import Term from IPython.ipapi import IPyAutocall @@ -41,4 +40,4 @@ class Macro(IPyAutocall): def __getstate__(self): """ needed for safe pickling via %store """ - return {'value': self.value} \ No newline at end of file + return {'value': self.value} diff --git a/IPython/numutils.py b/IPython/numutils.py index d809277..977d7ee 100644 --- a/IPython/numutils.py +++ b/IPython/numutils.py @@ -4,8 +4,7 @@ A set of convenient utilities for numerical work. Most of this module requires Numerical Python or is meant to be used with it. See http://www.pfdubois.com/numpy for details. - -$Id: numutils.py 958 2005-12-27 23:17:51Z fperez $""" +""" #***************************************************************************** # Copyright (C) 2001-2005 Fernando Perez @@ -14,10 +13,6 @@ $Id: numutils.py 958 2005-12-27 23:17:51Z fperez $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license - __all__ = ['sum_flat','mean_flat','rms_flat','base_repr','binary_repr', 'amin','amax','amap','zeros_like','empty_like', 'frange','diagonal_matrix','identity', diff --git a/IPython/platutils_win32.py b/IPython/platutils_win32.py index e732fb9..36f9b31 100644 --- a/IPython/platutils_win32.py +++ b/IPython/platutils_win32.py @@ -12,7 +12,6 @@ to use these functions in platform agnostic fashion. # the file COPYING, distributed as part of this software. #***************************************************************************** - import os ignore_termtitle = True diff --git a/IPython/rlineimpl.py b/IPython/rlineimpl.py index 5253419..aa0ba63 100644 --- a/IPython/rlineimpl.py +++ b/IPython/rlineimpl.py @@ -5,8 +5,7 @@ Readline is used throughout IPython as 'import IPython.rlineimpl as readline'. In addition to normal readline stuff, this module provides have_readline boolean and _outputfile variable used in genutils. - -$Id: Magic.py 1096 2006-01-28 20:08:02Z vivainio $""" +""" import sys @@ -53,4 +52,4 @@ if have_readline: _rl.clear_history except AttributeError: def clear_history(): pass - _rl.clear_history = clear_history \ No newline at end of file + _rl.clear_history = clear_history diff --git a/IPython/shellglobals.py b/IPython/shellglobals.py index 48994bf..34ce467 100644 --- a/IPython/shellglobals.py +++ b/IPython/shellglobals.py @@ -1,6 +1,13 @@ -from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no +"""Some globals used by the main Shell classes. +""" + +#----------------------------------------------------------------------------- +# Module imports +#----------------------------------------------------------------------------- -import thread,inspect +# stdlib +import inspect +import thread try: import ctypes @@ -8,8 +15,12 @@ try: except ImportError: HAS_CTYPES = False +# our own +from IPython.genutils import Term,warn,error,flag_calls, ask_yes_no +#----------------------------------------------------------------------------- # Globals +#----------------------------------------------------------------------------- # global flag to pass around information about Ctrl-C without exceptions KBINT = False @@ -22,13 +33,11 @@ MAIN_THREAD_ID = thread.get_ident() # Tag when runcode() is active, for exception handling CODE_RUN = None - #----------------------------------------------------------------------------- # This class is trivial now, but I want to have it in to publish a clean # interface. Later when the internals are reorganized, code that uses this # shouldn't have to change. - if HAS_CTYPES: # Add async exception support. Trick taken from: # http://sebulba.wikispaces.com/recipe+thread2 @@ -81,16 +90,12 @@ else: # Set global flag so that runsource can know that Ctrl-C was hit KBINT = True + def run_in_frontend(src): - """ Check if source snippet can be run in the REPL thread, as opposed to GUI mainloop - - (to prevent unnecessary hanging of mainloop). - + """ Check if source snippet can be run in the REPL thread, as opposed to + GUI mainloop (to prevent unnecessary hanging of mainloop). """ if src.startswith('_ip.system(') and not '\n' in src: return True return False - - - diff --git a/IPython/strdispatch.py b/IPython/strdispatch.py index 55e2eab..7113537 100644 --- a/IPython/strdispatch.py +++ b/IPython/strdispatch.py @@ -8,7 +8,6 @@ import re from IPython.hooks import CommandChainDispatcher import IPython.hooks - # Code begins class StrDispatch(object): """Dispatch (lookup) a set of strings / regexps for match. diff --git a/IPython/twshell.py b/IPython/twshell.py index c14c15a..f00ab02 100644 --- a/IPython/twshell.py +++ b/IPython/twshell.py @@ -1,3 +1,7 @@ +"""Twisted shell support. + +XXX - This module is missing proper docs. +""" import sys from twisted.internet import reactor, threads diff --git a/IPython/ultraTB.py b/IPython/ultraTB.py index 7d1b1b6..a11a0eb 100644 --- a/IPython/ultraTB.py +++ b/IPython/ultraTB.py @@ -59,8 +59,7 @@ ColorSchemeTable class. Currently the following exist: You can implement other color schemes easily, the syntax is fairly self-explanatory. Please send back new schemes you develop to the author for possible inclusion in future releases. - -$Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" +""" #***************************************************************************** # Copyright (C) 2001 Nathaniel Gray @@ -70,11 +69,6 @@ $Id: ultraTB.py 2908 2007-12-30 21:07:46Z vivainio $""" # the file COPYING, distributed as part of this software. #***************************************************************************** -from IPython import Release -__author__ = '%s <%s>\n%s <%s>' % (Release.authors['Nathan']+ - Release.authors['Fernando']) -__license__ = Release.license - # Required modules import inspect import keyword diff --git a/IPython/usage.py b/IPython/usage.py index 1d5cf35..7620d96 100644 --- a/IPython/usage.py +++ b/IPython/usage.py @@ -6,13 +6,6 @@ # the file COPYING, distributed as part of this software. #***************************************************************************** -# $Id: usage.py 2723 2007-09-07 07:44:16Z fperez $ - -from IPython import Release -__author__ = '%s <%s>' % Release.authors['Fernando'] -__license__ = Release.license -__version__ = Release.version - __doc__ = """ IPython -- An enhanced Interactive Python ========================================= @@ -650,5 +643,3 @@ or python names. The following magic functions are currently available: """ - - diff --git a/IPython/wildcard.py b/IPython/wildcard.py index b92ab5f..cea2245 100644 --- a/IPython/wildcard.py +++ b/IPython/wildcard.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- """Support for wildcard pattern matching in object inspection. - -$Id: OInspect.py 608 2005-07-06 17:52:32Z fperez $ """ #*****************************************************************************