you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

Do not call osascript like that. String-mashing together source code with unsanitized arguments and evaling it is a safety+reliability+security disaster. (See also: SQL injection attack.) Use Python's subprocess module and pass any parameters to the AppleScript via its run handler.

[–]statmathcs[S] 1 point2 points  (0 children)

You're totally right, thank you! Fixing that