[Tkinter-discuss] how to open a file using tkinter
Fredrik Lundh
fredrik at pythonware.com
Tue Jan 8 12:07:46 CET 2008
brindly sujith wrote:
> i am using TKINTER to create GUI application
>
> i want to know how to open a word document in open office or any other
> application
that's more of a Python question than a Tkinter question. on windows,
you can use the "os.startfile" function:
import os
os.startfile("mydocument.doc")
(this is the same as double-clicking on a document in the file explorer)
on other platforms, use os.system() and specify what application to run:
import os
os.system("someapp mydocument.doc")
</F>
More information about the Tkinter-discuss
mailing list