[Pythonmac-SIG] Reading from/writing to a web browser

Code Fodder codefodder@yahoo.com
Sat May 17 02:04:46 EDT 2003


Hello,

I have a newbie question.  I am trying to read an
arbitrary web page into a python script, parse the
page, then return it to the browser.

Should sys.stdin.read() accomplish the read portion
and should 'print' accomplish the write portion? 

I tried something like:

testfile = sys.stdin.read()
parsed_file = filein(testfile) #call to func in script
print parsed_file

If I read from a known url, I can get it to work from
the command line.  When I try the above from the
browser, I get a message in netscape stating the
document has no data.  IE just doesn't do anything.

Additional info:  Everything is running on an Apache
server, installed on a mac with OS X.

Thanks for any help!
-CF

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com




More information about the Pythonmac-SIG mailing list