##// END OF EJS Templates
Update copyright/author statements....
Update copyright/author statements. - Updated copyright statements to use the new form: # Copyright (C) 2008-2009 The IPython Development Team I left the old notices in place (just updating the year in some cases), because as far as I know, old copyright statements are not meant to be retroactively modified. - Also, on most files, replaced __author__ marks with an 'Authors' section in the module docstring. This reduces top-level code in the module, while ensuring that the Author(s) get properly acknowledged in auto-generated API docs (sphinx doesn't read __author__ marks, but it will include the module docstring). I only left a few in place for very old files that we ship externally, and for those by Laurent: he had his authorship mark both in the docstring and in __author__ variables, so I think out of courtesy it would be better to ask him about it on the list. All the others were I found regular __author__ variables, I moved them to the main docstring.

File last commit:

r1853:b8f5152c
r1875:bba7e571
Show More
FakeModule.py
42 lines | 1.4 KiB | text/x-python | PythonLexer
fperez
Reorganized the directory for ipython/ to have its own dir, which is a bit...
r0 # -*- coding: utf-8 -*-
"""
Class which mimics a module.
Needed to allow pickle to correctly resolve namespaces during IPython
sessions.
Fernando Perez
Remove svn-style $Id marks from docstrings and Release imports....
r1853 """
fperez
Reorganized the directory for ipython/ to have its own dir, which is a bit...
r0
#*****************************************************************************
# Copyright (C) 2002-2004 Fernando Perez. <fperez@colorado.edu>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#*****************************************************************************
fperez
- Fixes for doctest support. Need more testing, esp. to be sure they don't...
r834 import types
class FakeModule(types.ModuleType):
fperez
Reorganized the directory for ipython/ to have its own dir, which is a bit...
r0 """Simple class with attribute access to fake a module.
This is not meant to replace a module, but to allow inserting a fake
module in sys.modules so that systems which rely on run-time module
importing (like shelve and pickle) work correctly in interactive IPython
sessions.
Do NOT use this code for anything other than this IPython private hack."""
vivainio
revert fakemodule and oinspect mods, they broke unittest. monkeypatch is back
r363
fperez
- more fixes for doctest support.
r865 def __init__(self,adict=None):
# tmp to force __dict__ instance creation, else self.__dict__ fails
self.__iptmp = None
fperez
Reorganized the directory for ipython/ to have its own dir, which is a bit...
r0 # It seems pydoc (and perhaps others) needs any module instance to
# implement a __nonzero__ method, so we add it if missing:
fperez
- more fixes for doctest support.
r865 self.__dict__.setdefault('__nonzero__',lambda : True)
self.__dict__.setdefault('__file__',__file__)
fperez
Reorganized the directory for ipython/ to have its own dir, which is a bit...
r0
fperez
- more fixes for doctest support.
r865 # cleanup our temp trick
del self.__iptmp
vivainio
revert fakemodule and oinspect mods, they broke unittest. monkeypatch is back
r363
fperez
- more fixes for doctest support.
r865 if adict is not None:
self.__dict__.update(adict)