Here is python script it is program which gets current INTERNET speed from cli and saves it in a python variable
from subprocess import PIPE, Popen
def cmdline(command):
process = Popen(args=command,stdout=PIPE,shell=True)
return process.communicate()[0]
aa=(cmdline("awk '{if(l1){print ($2-l1)/1024,($10-l2)/1024} else{l1=$2; l2=$10;}}' <(grep eth0 /proc/net/dev) <(sleep 1); <(grep eth0 /proc/net/dev)"))
print(str(aa))
gives error
/bin/sh: 1: Syntax error: "(" unexpected
/bin/shrather thanbashas the shell and I think<(...)is abash-ism.