Difference between libraries and frameworks
Wednesday, 22 March 2006
Guido,
This is my empirical test for what is a library and what is a framework:
If I can use it from the Read-Eval-Print-Loop, it’s a library. Otherwise, it’s a framework.
There are quite a few libraries that are actually frameworks hiding in the Standard Python Library. xml.sax requires subclassing. Can anyone tell me how I’m supposed to experiment with this from the interpreter? Other frameworks are: HTMLParser, sgmllib, htmllib. Experimenting with screen-scraping using these libraries has never been so un-fun. In contrast, libraries such as urllib are pure pleasure to use.
How do you do your python development? Do you use the interpreter to test out code or do you prefer to run test-driven scripts?
No. 1 — March 24th, 2006 at 5:27 pm
> How do you do your python development? Do you use the interpreter to
> test out code or do you prefer to run test-driven scripts?
I use the shell, then doctest.