473,402 Members | 2,064 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,402 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
May 8 '23 #1
0 4463

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 an upcoming project. Specifically, I'm looking...
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 anyone knows of something, please let me know....
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 found python really convinient to manipulate XML, so...
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 specific page on the relevant site the first of...
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 comment, and... generating valid html code if...
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 in form --form send variables to python script...
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 in the cgi script to display it? Here is what...
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 httplib.HTTPConnection().request().getresponse().read(). Now the problem is: As soon as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.