can't find a way to display and print pdf through python.

Patricio Olivares polivare at lilyphilia.net
Mon Feb 12 17:41:32 EST 2007


On Feb 12, 3:06 pm, "krishnakant Mane" <researchb... at gmail.com> wrote:
> os.start does not work..  attribute error.
> regards.
> Krishnakant.

It's os.system('thefile') or os.system('start thefile') but
that's windows only.  It seems like there's no
platform-independent way to launch a preferred application to open
a file, but...

based on <http://cweiske.de/howto/launch/allinone.html>
I would suggest (by looking at sys.platform) to use "start" on
windows, "open" on mac, and on linux to use the xdg-open shell
script which is part of XdgUtils...
    <http://portland.freedesktop.org/wiki/>

It works standalone. Even seems it would not take too much
effort to port it to python if you want.





More information about the Python-list mailing list