1
왜 작동하지 않습니까?AppleScript에서 Python 스크립트를 실행하는 중 오류가 발생했습니다.
AppleScript를 :
set script_path to "$HOME/Desktop"
do shell script "python & script_path & hello_world.py"
파이썬 스크립트를
#!/usr/bin/env python
print "Content-Type: text/html"
print
print """\
<html>
<head>
<title>Python - Hello World</title>
</head>
<body>
Hello World
</body>
</html>
"" "
오류 :
것은 현재 응용 프로그램에게 쉘 스크립트를 수행"파이썬 & script_path & hello_world.py "-> 오류"sh : 스크립트 경로 : 명령을 찾을 수 없음 sh : hello_world.py : 명령을 찾을 수 없음 "번호 127 결과 : 오류"sh : script_path : 명령을 찾을 수 없음 sh : hello_world.py : command 찾을 수 없음 " 숫자 127
정말 AppleScript로 연결하는 방법입니까? 나는 백그라운드에서'python'을, 백그라운드에서는'script_path'를, 그리고'hello_world.py'를 실행한다고 생각합니다. 후자의 두 개는 존재하지 않습니다. – Ryan