##// END OF EJS Templates
Added compatibility layer for Shell/ipapi/iplib....
Added compatibility layer for Shell/ipapi/iplib. These 3 top-level modules have been moved to core. But, to ease the transition to their new location, we have re-created these modules at the top-level. The new top-level modules print a warning statement and simple import the moved modules for now. In the long run, we can use these for further compatibility related things.

File last commit:

r2053:75628622
r2061:73165067
Show More
tclass.py
27 lines | 657 B | text/x-python | PythonLexer
Fernando Perez
Cleanup testing machinery.
r1851 """Simple script to instantiate a class for testing %run"""
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 import sys
# An external test will check that calls to f() work after %run
Fernando Perez
Cleanup testing machinery.
r1851 class foo: pass
def f():
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856 return foo()
# We also want to ensure that while objects remain available for immediate
# access, objects from *previous* runs of the same script get collected, to
# avoid accumulating massive amounts of old references.
class C(object):
def __init__(self,name):
self.name = name
def __del__(self):
Fernando Perez
- Make ipdoctest a little cleaner by giving it separate option names....
r1910 print 'tclass.py: deleting object:',self.name
Fernando Perez
Fix bug: https://bugs.launchpad.net/ipython/+bug/269966...
r1856
try:
name = sys.argv[1]
except IndexError:
pass
else:
Fernando Perez
- Make ipdoctest a little cleaner by giving it separate option names....
r1910 if name.startswith('C'):
c = C(name)