中缀运算符将子流程输出管道化到python函数
xonsh可以将子流程输出到python函数吗中缀运算符将子流程输出管道化到python函数,python,xonsh,Python,Xonsh,xonsh可以将子流程输出到python函数吗 int($(ls|wc -l)) > 20 作为 我可以接近 from toolz import pipe pipe($(ls |wc -l),int) > 20 这是寻找方法来港 # bash [ $(ls |wc -l ) -gt 20 ] && echo busy dir # xonsh test @$(ls |wc -l) '-gt' 20 and echo busy dir # xonsh with mo
int($(ls|wc -l)) > 20
作为
我可以接近
from toolz import pipe
pipe($(ls |wc -l),int) > 20
这是寻找方法来港
# bash
[ $(ls |wc -l ) -gt 20 ] && echo busy dir
# xonsh
test @$(ls |wc -l) '-gt' 20 and echo busy dir
# xonsh with more python
len(`[^.].*`) > 20 and echo busy dir
但一般来说,我希望有一个中缀操作员,一个la的前向管道
%>%
或|>
,这是xonsh的一个公开问题:
# bash
[ $(ls |wc -l ) -gt 20 ] && echo busy dir
# xonsh
test @$(ls |wc -l) '-gt' 20 and echo busy dir
# xonsh with more python
len(`[^.].*`) > 20 and echo busy dir