[Haskell-beginners] Start file with associated prog (windows only?)

Bernhard Lehnert b.lehnert at gmx.de
Tue Aug 18 10:12:50 EDT 2009


Hello list,

I believe I am looking for a haskell equivalent to a python library
function called os.startfile(...) which starts any given file with its
associated program. 

http://docs.python.org/library/os.html#os.startfile says:
"...this acts like double-clicking the file in Windows Explorer, or
giving the file name as an argument to the start command from the
interactive command shell: the file is opened with whatever application
(if any) its extension is associated.
[...]
startfile() returns as soon as the associated application is launched."

So to show a readme you just write:
import os
os.startfile("README.rtf")

to show your programs documentation you just write
os.startfile("documentation.pdf") 
and windows will decide which program to use to open a PDF.

The must urgent thing I actually want to do is open an Internet Browser
with my sponsors URL. 

Any good ideas?

Thanks in advance,
Bernhard



More information about the Beginners mailing list