如何在Racket中调用其他程序?

时间:2013-09-19 11:23:33

标签: lisp scheme racket pandoc

我可以使用以下命令在Windows CMD中成功运行pandoc:

pandoc test.md -o test.html

然后我想在Racket中做同样的事情,我试过了:

(subprocess #f #f #f "pandoc" "test.md -o test.html")

(shell-execute "pandoc" "" "test.md -o test.html" (current-directory) 'sw_showdefault)

但他们都没有给我预期的.html文件。

这样做的正确方法是什么?谢谢。

1 个答案:

答案 0 :(得分:4)

我同意约书亚的看法,很难知道如何回答你最初提出的问题。也许你会编辑它。同时,按照原来的要求回答:

我认为在Racket中“在命令提示符下键入”的等价物是system,或更好system*

(system "pandoc test.md -o test.html")