import dominate
from dominate.tags import *
doc = dominate.document(title='Cell Value report')
with doc:
with div():
attr(cls='body')
h2('Values Missing in the files.....')
with div(id='header').add(ol()):
for i in unique_file:
li(i.title())
I tried this, to generate my python output in a HTML.
The HTML part is working fine if I hardcode the path in the os.listdir
But it shows error if I use path as input.
search_path = input("Enter directory path to search: ")#directory path
for fname in os.listdir(path=search_path):
This is the Error
TypeError: listdir: path should be string, bytes, os.PathLike or None, not input_
I even tried a library yattag
I have a List[]
in python, which I have to loop and print as a list in HTML.
I tried in yattag and I can't achieve, I'm not sure what I did wrong.
Is there any other libraries I should use to achieve my output.
Please give me some suggestions.
The error is because of the wildcard imports.
from dominate.tags import *
.dominate.tags
defines aninput
class that shadowed the builtininput()
function.This code works fine without the error.