472,336 Members | 1,246 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Python html

Hi

I am new to python. After upgrading to python 3.6 the html module which was earlier used is not working. The error is as below

from html import HTML
ImportError: cannot import name 'HTML'


Objective of the code is to read the data from file and outputing into html page.

The snippet of source code and the version is as below
python --version
Python 3.6.8


Expand|Select|Wrap|Line Numbers
  1. import time
  2. import sys
  3. import os
  4. import re
  5. import pymongo
  6. from  pymongo import MongoClient
  7. import base64
  8. from datetime import datetime,timedelta
  9. from html import HTML
  10.  
  11. d = datetime.today() - timedelta(hours=0, minutes=180)
  12. d1 = d.strftime("%d/%B/%Y,%H:%M:%S")
  13.  
  14.  
  15. h=HTML('html','')
  16. title=h.title('DASHBOARD With PriceLine')
  17.  
  18.  
  19.  
Any help is highly appreciated
3 Weeks Ago #1
0 4056

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mikey At Work | last post by:
I'm looking for opinions on the several HTML documentation generators available for Python. We're trying to standardize the documentaion used for...
4
by: Steve Young | last post by:
Hi, I am looking for something where I can go through a html page and make change the url's for all the links, images, href's, etc... easily. If...
10
by: Sullivan WxPyQtKinter | last post by:
Hi, everyone. Simply put, what I need most now is a python lib to generate simple HTML. I am now using XML to store my lab report records. I...
2
by: wipit | last post by:
I need to process a HTML form in python. I'm using urllib2 and HTMLParser to handle the html. There are several steps I need to take to get to the...
4
by: Pierre Imbaud | last post by:
Hi, Im looking for a way to display some python code in html: with correct indentation, possibly syntax hiliting, dealing correctly with multi-line...
8
by: flit | last post by:
Hello All, I am trying to get information from a form and send it to a python script without success.. Here is my objective: User enters data...
6
by: baur79 | last post by:
hi everyone how can i render html page to png image ex: http://www.website.com/index.html -index.png thanks a lot
3
by: Ladislav Andel | last post by:
Hi, I'm trying to display image through my cgi script in HTML page via <img src="image.cgi"> Can you give me an example, please? What should be...
5
by: Johannes Bauer | last post by:
Hello group, I'm trying to use a htmllib.HTMLParser derivate class to parse a website which I fetched via...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

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.