Why doesn't this work?
Applescript:
set script_path to "$HOME/Desktop"
do shell script "python & script_path & hello_world.py"
Python script:
#!/usr/bin/env python
print "Content-Type: text/html"
print
print """\
<html>
<head>
<title>Python - Hello World</title>
</head>
<body>
Hello World
</body>
</html>
"""
Errors:
tell current application do shell script "python & script_path & hello_world.py" --> error "sh: script_path: command not found sh: hello_world.py: command not found" number 127 Result: error "sh: script_path: command not found sh: hello_world.py: command not found" number 127
pythonin the background,script_pathin the background, andhello_world.py. (The latter two don't exist.)