Is it possible in python to open all files in a directory?
this only opens a particular file:
import os
path = "/Desktop/directory/file.odt"
temp = os.system("open " + path)
how about this? am i doing it right?
import os
mypath = "/Desktop/directory"
temp = os.listdir(mypath)
temp = [os.path.join(mypath, i)
for i in temp:
if os.path.splitext(f)[1] in mytemp]
os.system("open " + temp)
Advises and comments are very much appreciated. Thank you