473,321 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

html renderer

I am looking for a textual html renderer (such as lynx) to be
called from a Python program. The only needed functionality is
the following: passing to it a string it should show the html file at
the first match of the string (it does not seem obvious to do it with
lynx, please correct me if I am wrong). Essentially, I want to be able to
to browse rapidly over a bunch of html files. Fancy graphics is not
important, easy of use is very important. Portable solutions are
better, but a Linux only solution would be good enough.

Any pointer?

TIA,

Michele
Jul 18 '05 #1
2 2222
Am Sun, 16 Nov 2003 06:10:04 -0800 schrieb Michele Simionato:
I am looking for a textual html renderer (such as lynx) to be
called from a Python program. The only needed functionality is
the following: passing to it a string it should show the html file at
the first match of the string (it does not seem obvious to do it with
lynx, please correct me if I am wrong). Essentially, I want to be able to
to browse rapidly over a bunch of html files. Fancy graphics is not
important, easy of use is very important. Portable solutions are
better, but a Linux only solution would be good enough.


Hi,

may be this helps:

# untested
fd=os.popen("lynx -dump foo.html")
content=fd.read()
fd.close()
idx=content.find("yourtext")
print content[idx-20:idx+20]

thomas

Jul 18 '05 #2
mi**@pitt.edu (Michele Simionato) writes:
I am looking for a textual html renderer (such as lynx) to be [...] important, easy of use is very important. Portable solutions are
better, but a Linux only solution would be good enough.


Just a note, since people seem to assume otherwise: lynx is
cross-platform :-)
John
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ian Bicking | last post by:
Does anyone know of a module that can render HTML to text? Just a subset of HTML, really; I'd like to compose emails using <p> tags and whatnot, fill in all the values in the email template, then...
8
by: Frank Ratzlow | last post by:
Hi folks, I have a list of entries where some entries contain the special character (quotes) within in the string. If I try to save this entry everything after the quotes is skipped. The reason...
28
by: Christopher Benson-Manica | last post by:
I have the following document, at http://ataru.gomen.org/file/test.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>...
27
by: Michael C | last post by:
Anyone know of a good HTML Rendering control? I need a control that will render and display HTML in a Windows form. It doesn't need to pull down HTML pages from the Web - I'll feed it all the...
4
by: ddd | last post by:
I am trying to build a diff tool that allows me to compare two HTML files. I am looking for resources on how to achive this. The main problem is that I do not want to simply highlight the line of...
6
by: robert_marquardt | last post by:
Is there am Open Source tool available for that? I may need such a tool to create HTML files for eBooks. eBook renderers may not understand CSS at all or at least have not access to the CSS file...
8
by: rn5a | last post by:
I have a HTML page named Index.html which is divided into 3 frames. The URL of 2 of the frames are HTML pages but the 3rd frame houses a ASP page. Now when I go to Windows Explorer, navigate to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.