Args for sb-ext:run-program

限于喜欢 提交于 2020-01-04 03:51:29

问题


Can someone tell me exactly what the args argument should look like for sb-ext:run-program?

If I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               "C:/lispbox-0.7/opus.mid")

I get this error:

debugger invoked on a TYPE-ERROR:
  The value "C:/lispbox-0.7/opus.mid" is not of type LIST.

However, if I do this:

(sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:\lispbox-0.7\opus.mid"))

iTunes opens, but the MIDI file doesn't play, even though this invocation from the Windows command prompt works just fine:

U:\>"C:\Program Files\iTunes\iTunes.exe" C:\lispbox-0.7\opus.mid

Note that this (with forward slashes):

CL-USER> (sb-ext:run-program "C:/Program Files/iTunes/iTunes.exe" 
               (list "C:/lispbox-0.7/opus.mid"))

has the same effect: iTunes opens, but the file is not played.


回答1:


In the list version you're using single backslashes, which get parsed as escape sequences. You need to use double backslashes.



来源:https://stackoverflow.com/questions/4078448/args-for-sb-extrun-program

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!