Re: Looking for example demonstrating calling python from Objective-C
"Diez B. Roggisch" <[email protected]> Wed, 5 Dec 2018 11:53:16 +0100
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============4346404166951408281== Content-Type: multipart/alternative; boundary=Apple-Mail-046D7AE2-0427-4CA0-85D0-DFC9473F9B8B Content-Transfer-Encoding: 7bit --Apple-Mail-046D7AE2-0427-4CA0-85D0-DFC9473F9B8B Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I suggest passing an object inherited from NSObject into objective C code. T= hat=E2=80=99s all that there is to this. Every subclass you create that is e= .g. a NSView or AppDelegate or whatever is an actual example of objective C i= nvoking Python.=20 Diez=20 Von meinem iPad gesendet > Am 19.11.2018 um 17:29 schrieb Dmitry Wolf <[email protected]>: >=20 > I'm trying to figure out how to call python from cocoa/objective-c code, b= ut haven't found any example code that actually works. There seem to be all s= orts of examples of pure python calling into frameworks and objective-c code= , but nothing showing how to set up calls from a standard objective-c app in= to python. >=20 > Actually I just copy pasted this question from 2006 thread https://sourcef= orge.net/p/pyobjc/mailman/message/11676132/ > Because I have exactly this question :D > _______________________________________________ > Pyobjc-dev mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev --Apple-Mail-046D7AE2-0427-4CA0-85D0-DFC9473F9B8B Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D= utf-8"></head><body dir=3D"auto">I suggest passing an object inherited from N= SObject into objective C code. That=E2=80=99s all that there is to this. Eve= ry subclass you create that is e.g. a NSView or AppDelegate or whatever is a= n actual example of objective C invoking Python. <div><br></div><div>Di= ez <br><br><div id=3D"AppleMailSignature" dir=3D"ltr">Von meinem iPad g= esendet</div><div dir=3D"ltr"><br>Am 19.11.2018 um 17:29 schrieb Dmitry Wolf= <<a href=3D"mailto:[email protected]">[email protected]</a>>:<br><b= r></div><blockquote type=3D"cite"><div dir=3D"ltr"><div dir=3D"ltr"><div dir= =3D"ltr">I'm trying to figure out how to call python from cocoa/objective-c c= ode, but haven't found any example code that actually works. There seem to b= e all sorts of examples of pure python calling into frameworks and objective= -c code, but nothing showing how to set up calls from a standard objective-c= app into python.<div><br></div><div>Actually I just copy pasted this questi= on from 2006 thread <a href=3D"https://sourceforge.net/p/pyobjc/mailman= /message/11676132/">https://sourceforge.net/p/pyobjc/mailman/message/1167613= 2/</a></div><div>Because I have exactly this question :D</div></div></div> </div></blockquote><blockquote type=3D"cite"><div dir=3D"ltr"></div></blockq= uote><blockquote type=3D"cite"><div dir=3D"ltr"><span>______________________= _________________________</span><br><span>Pyobjc-dev mailing list</span><br>= <span><a href=3D"mailto:[email protected]">[email protected]= ourceforge.net</a></span><br><span><a href=3D"https://lists.sourceforge.net/= lists/listinfo/pyobjc-dev">https://lists.sourceforge.net/lists/listinfo/pyob= jc-dev</a></span><br></div></blockquote></div></body></html>= --Apple-Mail-046D7AE2-0427-4CA0-85D0-DFC9473F9B8B-- --===============4346404166951408281== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============4346404166951408281== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pyobjc-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyobjc-dev --===============4346404166951408281==--