On 9 Jan, 09:24, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > [Opening files in applications]
> 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") Or try the desktop module which uses os.startfile on Windows, but employs mechanisms appropriate for other desktop environments elsewhere: http://www.python.org/pypi/desktop This code should do the trick: import desktop desktop.open("mydocument.doc") This assumes that your desktop environment knows how to handle .doc files, of course. Paul -- http://mail.python.org/mailman/listinfo/python-list