Live data from Hacker News

Using Python for Scripting

hypirion.com

111–112 of 112 posts

Re: Using Python for Scripting

#111

Earlier quoted context omitted.

And for the opposite, where you keep your main pipeline in shell but want to use python for some parts of it, there is pypyp. https://pypi.org/project/pypyp/ It takes cares of the input and output boilerplate so you can focus on the actual code that you wanted python for. > seq 1 5 | pyp 'sum(map(int, lines))' > ls | pyp 'Path(x).suffix'

So cool! I made pawk [1] to get some of the same features, but yours is better! Congrats! [1] https://github.com/jean-philippe-martin/pawk

I am not the author haha. Just someone who found and really liked that library.

Re: Using Python for Scripting

#112
> Finally, it should be noted that this doesn’t work in ZSH, and if you’re using ZSH, you probably are a bit more of a terminal enthusiast than the average person. And if the enthusiasts can’t use this in their favourite shell, it’s less likely that they will use it in the scripts they make.

Important thing to note here is, ZSH is the default on macOS.

Post reply on HN