##// END OF EJS Templates
Transformers have been added to the prefilter....
Transformers have been added to the prefilter. Transformers are run first before the checkers/handlers and simple transform lines of input. In the long run, we are going to move away from checkers/handlers and just use transformers. The new transformers are used to implement the a=!ls and b=%who syntax.

File last commit:

r2053:75628622
r2273:01effcc5
Show More
tclass.py
27 lines | 657 B | text/x-python | PythonLexer
"""Simple script to instantiate a class for testing %run"""
import sys
# An external test will check that calls to f() work after %run
class foo: pass
def f():
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):
print 'tclass.py: deleting object:',self.name
try:
name = sys.argv[1]
except IndexError:
pass
else:
if name.startswith('C'):
c = C(name)