One more, ported from VB code I found via Google: def nput(n, prompt): for i in range(n): tx.schedule(puts.pop()) if prompt: tx.immediate = True tx.kick() I think this has something to do with stock derivatives? If you want to use this to get rich off high-frequency trading, you may want to cythonize or numpyize it.