Dispatching default application for file, cross platform.
Hendrik van Rooyen
mail at microcorp.co.za
Wed Aug 22 11:01:16 EDT 2007
"Tommy Nordgren" <tommy.nordgren at comhem.se> wrote:
>
> On 22 aug 2007, at 12.04, Peter Otten wrote:
>
> > Tim Golden wrote:
> >
> >> Hendrik van Rooyen wrote:
> >>> How do I do the equivalent of clicking (in SuSe) or double
> >>> clicking (in
> >>> Windows) on a file?
> >>>
> >>> In effect I want to tell the OS - take this file and feed it to the
> >>> application that is registered for it.
> >
> >> os.startfile
> >
> > Unfortunately this is Windows-only.
> > For KDE you can use
> >
> > $ kfmclient exec yourfile
> >
> > Peter
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> On Mac OS X, invoke the command /usr/bin/open -a <Application>
> file , or /usr/bin/open file
Thanks Tommy - was not thinking of Macs, but nice to know...
- Hendrik
More information about the Python-list
mailing list