Well, you can run any system command from within Python as well:
import os
os.system('clear')
But I'm not sure this will help in this case. Are you trying to program
a console app in Python? If so, you may want to look into curses
module or other console lib that has Python bindings (like newt)
There is a (relatively) widely used technique in unit testing, called
mock objects. There is even a pMock library which provides a Mock class
for a Python environment.
Given the "duck typing" nature of the Python itself, it's pretty
trivial to build mocks without using any pre-built libraries. Wha
Hi,
I'm trying to find all modules that contain doctests and execute them
(using DocTestSuite). The problem is how to iterate (programmatically)
through the package's modules.
>>> import M
>>> inspect.getmembers(M, inspect.ismodule)
[]
Iterating through the source files (via glob) does not help