My Common Lisp program writes out an HTML file. I then want to launch this file in the user's default browser.
Is there a way of doing this in Common Lisp? Moreover, is there an OS-independent way of doing this?
My Common Lisp program writes out an HTML file. I then want to launch this file in the user's default browser.
Is there a way of doing this in Common Lisp? Moreover, is there an OS-independent way of doing this?
No. That would be a pretty useful thing to do, so if you write code to do it portably, share!
There is no standard way to do it, but there is a reasonably portable library that can execute shell commands.
This depends on the Common Lisp implementation and possibly the platform it runs on (Windows, Mac, Linux, ...).
LispWorks provides the function SYS:OPEN-URL. See http://www.lispworks.com/documentation/lw60/LW/html/lw-1369.htm#pgfId-1219832
(sys:open-url "http://www.foo.com/")
One certainly can also use a file URL.