`webbrowser` Python 包是否有 Haskell 等价物?
Are there Haskell equivalents for the `webbrowser` Python package?
Python 有非常方便的 webbrowser
包,其中包含一个 webbrowser.open()
功能,允许在某个位置打开浏览器,甚至在本地文件系统中的文件上。这样 Python 程序可以生成一个 Web 文档作为输出并将其呈现给用户。哪些 Haskell 包公开了类似的功能?
有一个包名为 open-browser:
$ stack ghci open-browser
Run from outside a project, using implicit global project config
Using resolver: lts-6.14 from implicit global project's config file: /home/sibi/.stack/global-project/stack.yaml
open-browser-0.2.1.0: using precompiled package
Configuring GHCi with the following packages:
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help
λ> import Web.Browser
λ> openBrowser "https://www.google.com"
True
这会在我的默认浏览器 Firefox 中打开 google 页面。
Python 有非常方便的 webbrowser
包,其中包含一个 webbrowser.open()
功能,允许在某个位置打开浏览器,甚至在本地文件系统中的文件上。这样 Python 程序可以生成一个 Web 文档作为输出并将其呈现给用户。哪些 Haskell 包公开了类似的功能?
有一个包名为 open-browser:
$ stack ghci open-browser
Run from outside a project, using implicit global project config
Using resolver: lts-6.14 from implicit global project's config file: /home/sibi/.stack/global-project/stack.yaml
open-browser-0.2.1.0: using precompiled package
Configuring GHCi with the following packages:
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help
λ> import Web.Browser
λ> openBrowser "https://www.google.com"
True
这会在我的默认浏览器 Firefox 中打开 google 页面。