为什么这不起作用?
苹果脚本:
set script_path to "$HOME/Desktop"
do shell script "python & script_path & hello_world.py"
Python脚本:
#!/usr/bin/env python
print "Content-Type: text/html"
print
print """\
<html>
<head>
<title>Python - Hello World</title>
</head>
<body>
Hello World
</body>
</html>
"""
错误:
告诉当前应用程序执行 shell script "python & script_path & hello_world.py" --> error "sh: script_path: command not found sh: hello_world.py: command not found" number 127 结果: error "sh: script_path: command not found sh:hello_world.py:找不到命令“第 127 号