Just an idea I'll put out, in case anyone finds it interesting...
A WSGI opener for urllib2 would be interesting. I imagine using it like:
import urllib2 import wsgiurl
myapp = construct_app()
wsgiurl.register_app('myapp', myapp) f = urllib2.urlopen('wsgi:myapp/login')
and so on. Then things like PBP and Twill could, I think, be run on top of an in-process WSGI application. Though I suspect that some of these might like like the wsgi: scheme...? If so, an option like:
wsgiurl.register_app('myapp', myapp, scheme='http') f = urllib2.urlopen('http://myapp/login')
Would be useful. This would probably require some monkeypatching of urllib2 to intercept calls to some domains.
Either way, this makes functional and acceptance testing easier and faster to perform (since there's no server setup), and means that the same tools can easily be used for both in-process and remote testing. Anyway, I think it would be neat, and maybe one of you guys will think it's a neat idea and implement it...? ;)
-- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com