0

Yes, I know about NSTask.

For my example, I want to use command python in my GUI Cocoa app.

How do you run a sub command in Cocoa app? And how can you have a Cocoa app communicate with the command line tool?

Thank you for any answer. Sorry for my pool english.

theeagle
  • 141
  • 1
  • 9
  • Why doesn't NSTask work for you? – shebang Jan 18 '18 at 00:25
  • @shebang. I run python with NSTask, and then cocoa app has no responding in python subcommand. No output of pipe. Other more how cocoa app communate with subcommand of python? – vincent z Jan 18 '18 at 01:50
  • NSTask has standardInput and standardOutput properties that you can use to communicate with python's sys.stdin and sys.stdout. – shebang Jan 18 '18 at 03:17

0 Answers0