Re: How to include or install a Python runtime in an AppleScript applet
[email protected] Mon, 4 Oct 2021 01:04:10 +0200
| Newsgroups | gmane.comp.python.apple |
|---|---|
| Message-ID | <[email protected]> |
--===============7188793672441821754== Content-Type: multipart/alternative; boundary="Apple-Mail=_74C28D5A-3D3C-4D3B-B8C5-8615A565070E" --Apple-Mail=_74C28D5A-3D3C-4D3B-B8C5-8615A565070E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Another option would be that the AppleScript checks whether the correct = Python is installed (or maybe one of several usable Pythons, for example = the official Python 3.x installer or a brew installation) and use that = if it is. And if no suitable Python is found it could redirect the user = to a web page with instructions on how to install a compatible Python. That is sort-of what Kevin suggests (Point users to a Python = installation), but with a bit of automation added. Jack > On 2 Oct 2021, at 16:22, Kevin Walzer <[email protected]> wrote: >=20 >=20 > On 9/28/21 1:12 AM, Vincentius Vincentius wrote: >>=20 >> Can anyone help me with advice on how to create and distribute a = Python runtime (with my applet) ? >>=20 > Point your users to the installer for the Mac version of Python: >=20 > https://www.python.org/ftp/python/3.9.7/python-3.9.7-macosx10.9.pkg = <https://www.python.org/ftp/python/3.9.7/python-3.9.7-macosx10.9.pkg> > There is no simple way to embed a Python installation within an = AppleScript applet. If you're doing that, you might as well all the way = and deploy your script as a full Mac application with Python libraries = bundled using a tool like py2app.=20 >=20 > --Kevin=20 >=20 > --=20 > Kevin Walzer > Code by Kevin > http://www.codebykevin.com <http://www.codebykevin.com/> > _______________________________________________ > Pythonmac-SIG maillist - [email protected] > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --Apple-Mail=_74C28D5A-3D3C-4D3B-B8C5-8615A565070E Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><div = class=3D"">Another option would be that the AppleScript checks whether = the correct Python is installed (or maybe one of several usable Pythons, = for example the official Python 3.x installer or a brew installation) = and use that if it is. And if no suitable Python is found it could = redirect the user to a web page with instructions on how to install a = compatible Python.</div><div class=3D""><br class=3D""></div><div = class=3D"">That is sort-of what Kevin suggests (Point users to a Python = installation), but with a bit of automation added.</div><div = class=3D""><br class=3D""></div><div class=3D"">Jack</div><div = class=3D""><br class=3D""><div><br class=3D""><blockquote type=3D"cite" = class=3D""><div class=3D"">On 2 Oct 2021, at 16:22, Kevin Walzer <<a = href=3D"mailto:[email protected]" class=3D"">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""> =20 <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3DUTF-8" class=3D""> =20 <div class=3D""> <div class=3D"moz-cite-prefix"><br class=3D""> </div> <div class=3D"moz-cite-prefix">On 9/28/21 1:12 AM, Vincentius Vincentius wrote:<br class=3D""> </div> <blockquote type=3D"cite" = cite=3D"mid:[email protected]" class=3D""> <meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3DUTF-8" class=3D""> <div class=3D""> <div class=3D"" style=3D"caret-color: rgb(0, 0, 0); font-family: = TimesNewRomanPSMT;"><br class=3D""> </div> <div class=3D"" style=3D"caret-color: rgb(0, 0, 0); font-family: = TimesNewRomanPSMT;">Can anyone help me with advice on how to create and distribute a Python runtime (with my applet) ?</div> </div> <div class=3D""><br class=3D""> </div> </blockquote><p class=3D"">Point your users to the installer for the = Mac version of Python:</p><p class=3D""><a class=3D"moz-txt-link-freetext"= = href=3D"https://www.python.org/ftp/python/3.9.7/python-3.9.7-macosx10.9.pk= g">https://www.python.org/ftp/python/3.9.7/python-3.9.7-macosx10.9.pkg</a>= </p><p class=3D"">There is no simple way to embed a Python installation = within an AppleScript applet. If you're doing that, you might as well all the way and deploy your script as a full Mac application with Python libraries bundled using a tool like py2app. <br class=3D""> </p><p class=3D"">--Kevin <br class=3D""> </p> <pre class=3D"moz-signature" cols=3D"72">--=20 Kevin Walzer Code by Kevin <a class=3D"moz-txt-link-freetext" = href=3D"http://www.codebykevin.com/">http://www.codebykevin.com</a> </pre> </div> _______________________________________________<br = class=3D"">Pythonmac-SIG maillist - <a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br class=3D""><a = href=3D"https://mail.python.org/mailman/listinfo/pythonmac-sig" = class=3D"">https://mail.python.org/mailman/listinfo/pythonmac-sig</a><br = class=3D"">unsubscribe: = https://mail.python.org/mailman/options/Pythonmac-SIG<br = class=3D""></div></blockquote></div><br class=3D""></div></body></html>= --Apple-Mail=_74C28D5A-3D3C-4D3B-B8C5-8615A565070E-- --===============7188793672441821754== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pythonmac-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG --===============7188793672441821754==--