I get the path
dire=os.path.abspath(".")
and
for fileName in filter(os.path.isfile, os.listdir(path=direc))
but dire
has C:\\
and sends me the next error:
TypeError: listdir() takes no keyword arguments
when I print dire
to see the content print next:
C:\\user\\documents....
what can I do to get \
and not \\
in os.path.abspath(".")
?
I'm assuming that by
print
you meanrepr
.Note that while printing there aren't neither double
\\
nor'
The other point is the error
TypeError: listdir() takes no keyword arguments
so why dont try:
instead of