def wget_url(url):
try:
wget = subprocess.Popen(["wget "+url],shell=True,stdout=PIPE,stderr=PIPE)
return wget
except:
print("HTTP error")
a=wget_url(url)
a.stdout.readlines() #return an empty string.
a.stderr.readlines() #return the normal output that would be displayed in terminal
is this normal? Why stdout returns nothing?