top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Generating HTML in python?

0 votes
30 views

In Perl I had been using HTML::Element with great success, and now I would like to know if something similar exists for Python?

I would like to construct the complete page as a plain python structure and then feed it to a function to get a chunk of HTML ready to send to the client.

Something like:

table_struct = [table, [tr, [td, {class=>"red"}, "this is red"],[td, {class=>"blue"}, "this is not red"]]]   
html = struct2html(table_struct)
posted Jul 29, 2013 by Sheetal Chauhan

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote
answer Jul 29, 2013 by Mandeep Sehgal
Similar Questions
0 votes

I was looking for a good tutorial for a "HTML Parser". My intention was to extract tables from web pages or information from tables in web pages.

I tried to make a search, I got HTMLParser, BeautifulSoup, etc. HTMLParser works fine for me, but I am looking for a good tutorial to learn it nicely.

I could not use BeautifulSoup as I did not find an .exe file.

I am using Python 2.7 on Windows 7 SP1 (64 bit).

I am looking for a good tutorial for HTMLParser or any similar parser which have an .exe file for my environment and a good tutorial.

–1 vote

I'm working on a new project and i want to receive a request from a user and to redirect him to a third party site, but on the page after i redirect my users i want to them to see injected html (on the third party site.)

i'm not really sure how to approach this problem..

0 votes

I can log into a web site with pexpect but what I want to do is pipe the opening window to a file. Logging into the site opens the site window but I can't get the window to a file.

I can't use screen capture I need to get pexpect to pipe it to a txt file.


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...