I am using the following command to pass a string to python from Applescript
String mytext contains the HTML body of an email starting with <…
Applescript
display dialog (do shell script "/Users/mymac/Documents/'Microsoft User Data'/'Outlook Script Menu Items'/ test.py" & mytext)
Python
#!/usr/bin/env python
import sys
import string
def main():
print sys.argv[1:]
if __name__ == "__main__":
main()
How can I rectify this error?
You don’t want to pass the HTML as an argument to the Python script. Instead, do something like: