0
Python question
file = open("/storage/emulated/0/Documents/Dino sololearn.docx", "r") cont = file.read() print(cont) file.close()
8 ответов
+ 2
That code is meant for text files.
Docx is "a bit" more complex than that
You could try this:
https://www.google.de/search?q=JUMP_LINK__&&__python__&&__JUMP_LINK+docx
+ 1
if you want to work with docx files you have to import docx , but it is easier to convert your file to txt , then
file= open("Dino.txt", "r")
for x in file:
print(x)
+ 1
I have use TXT but still not working
+ 1
file= open(/"storage/emulated/0/dino sololearn.txt")
for x in file:
print(x)
0
Can any body tell how i can print a microsoft word document i am using andriod
0
So what are text files
0
Text files are files that contain text. Sorry for the tautology.
Common file endings are txt, xml, csv, html etc
You can open them in a text editor.
Docx is a container (zip file) with a certain structure
0
Dino Gupta you forget to read the file "r" , in your reply you didn’t write it :
file= open(/"storage/emulated/0/dino sololearn.txt", "r")
for x in file:
print(x)