"Diez B. Roggisch" <[EMAIL PROTECTED]> writes: > bruce schrieb: > > hi... > > i can do the following > > br = Browser > > br.open("www.yahoo.com") > > br.open("file:///foo") > > but can i do > > s = "..." <<<< qualified html text > > br.open(s) > > i'm curious, if i have html from someother source, is there a way > > to simply > > get it into the "Browser" so i can modify it... > > Use the tempfile-module to create a temporary file, write your HTML in > there and point the browser to it. Alternatively, you could fire up a > SimpleHTTPServer and serve the content. For HTML-only this would be > overkill, but if you need images as well it might be worth it.
There are better/other ways which I've already pointed bruce to on the mailing list that covers module mechanize ([EMAIL PROTECTED]). I've asked Bruce not to cross-post all this stuff -- partly since he's not likely to get a good answer from anybody but me and the others on that list, but also to avoid irritating everybody on c.l.py ;-) John -- http://mail.python.org/mailman/listinfo/python-list