from twisted.lore import default import spitters class MyProcessingFunctionFactory(default.ProcessingFunctionFactory): latexSpitters={None: spitters.MyLatexSpitter, } # initialize the global variable factory with an instance of your new factory factory=MyProcessingFunctionFactory()