desktop module (was Re: Open PDF)

Paul Boddie paul at boddie.org.uk
Fri Sep 23 12:42:49 EDT 2005


Dennis Lee Bieber skrev:
> On Thu, 22 Sep 2005 15:16:09 +0100, Dan <dan at cellectivity.com> declaimed
> the following in comp.lang.python:
>
> > > I would like to know how to open a PDF document from a python script
> >
> > You mean open it and display it to the user? Under Windows you may be
> > able to get away with just "executing" the file (as though it were an
> > executable):
>
>  For Windows, os.startfile() may be better...

I've just uploaded a patch/suggestion/module (#1301512) to SourceForge
which seeks to provide the equivalent of os.startfile for KDE and GNOME
(as well as Windows) as part of a generic desktop module:

http://sourceforge.net/tracker/index.php?func=detail&aid=1301512&group_id=5470&atid=305470

Rather than submit yet another PEP and argue about insignificant
details whilst the webbrowser module sits comfortably in the standard
library, failing to address general file-opening issues directly and
doing the wrong thing under various modern desktop environments, I
advocate people submitting suggestions, criticism and amendments to the
uploaded attachment until we have something like os.startfile for all
major desktop environments.

Paul




More information about the Python-list mailing list