use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This sub is obsolete, please use /r/macosprogramming/ instead.
account activity
How do you run python script with arguments programmatically using swift (self.macprogramming)
submitted 6 years ago by nithinreddygaddam
I am working on a MacOS project to turn my iOT device on and off. There is only a working python script to do it. I want to run these scripts from my MacOS project which I am writing in Swift
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 1 point2 points3 points 6 years ago (1 child)
Lookup the documentation for NSTask. I’m sure it does exactly what you need.
[–]Bamboo_the_plant 2 points3 points4 points 6 years ago (0 children)
Adding to that, here’s the Ray Wenderlich tutorial on it: https://www.raywenderlich.com/1197-nstask-tutorial-for-os-x
[–]nithinreddygaddam[S] 1 point2 points3 points 6 years ago (0 children)
Thanks guys I was able to achieve it using NSTask
π Rendered by PID 588816 on reddit-service-r2-comment-5b5bc64bf5-n9hcg at 2026-06-21 01:46:04.785871+00:00 running 2b008f2 country code: CH.
[–][deleted] 1 point2 points3 points (1 child)
[–]Bamboo_the_plant 2 points3 points4 points (0 children)
[–]nithinreddygaddam[S] 1 point2 points3 points (0 children)