Launch file based on association
Chris Cioffi
evenprimes at gmail.com
Mon Jan 23 13:17:51 EST 2006
On 23/01/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
>
> Chris Cioffi wrote:
>
> > Q: If I have a file called "spreadsheet.xls" how can I launch it in
> what
> > ever program it is associated with? I don't care if that program is
> Excel
> > or OpenOffice Calc. I just want to launch the file.
>
> >>> import os
> >>> help(os.startfile)
> Help on built-in function startfile in module nt:
>
> startfile(...)
> startfile(filepath) - Start a file with its associated application.
>
> [snip]
I knew that as soon as I asked this question someone would very simply show
me why I'm a moron! ;)
Thank you! Chris
--
"A little government and a little luck are necessary in life, but only a
fool trusts either of them." -- P. J. O'Rourke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060123/b8d921cc/attachment.html>
More information about the Python-list
mailing list