pixelgeek Posted March 15, 2023 Share Posted March 15, 2023 My continuing Hugo workflow is going to require me to write some code for a Script Filter. It just needs to get a list of the files in a directory. I can do it easily enough in Node but I suspect that not a lot of people have the installed already? So is Python more accessible for people? Link to comment
vitor Posted March 16, 2023 Share Posted March 16, 2023 1 hour ago, pixelgeek said: So is Python more accessible for people? In general yes, since it can be installed directly by macOS via the Developer Tools. But in that sense /usr/bin/osascript (JavaScript) is even better because it’a always there, though some operations may require the Objective-C bridge (having access to it is a plus). In practice, with the Gallery’s dependency resolution any language is fine and can be installed without hassle. Link to comment
pixelgeek Posted March 16, 2023 Author Share Posted March 16, 2023 20 minutes ago, vitor said: In practice, with the Gallery’s dependency resolution any language is fine and can be installed without hassle. I know that. I just don't want to inflict Node on anyone if I can avoid it. 20 minutes ago, vitor said: In general yes, since it can be installed directly by macOS via the Developer Tools. Does that install v3 now or is it still v2? Link to comment
vitor Posted March 16, 2023 Share Posted March 16, 2023 Just now, pixelgeek said: Does that install v3 now or is it still v2? It has always installed Python 3. Python 2 was just the one that shipped by default. Both can coexist as they’re different binaries (python VS python3; the 3 is really part of the name). The exact version varies by macOS version and is a few behind the latest upstream (perhaps for stability/security). On Monterey it was Python 3.8.9, on Ventura it’s 3.9.6. You can always determine the version with /usr/bin/python3 --version. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now