In linux shell I have
myip=`curl http://169.254.169.254/latest/meta-data/local-ipv4`
But I need to do the same on Python. I'm trying to do
inport os
myip=os.system("curl http://169.254.169.254/latest/meta-data/local-ipv4")
but get nothing. I tried echo, export myip = etc.