これをシェルで実行すると、具体的な結果が得られます。
wget -O c1 --no-cache "http://some.website" | sed "1,259d" c1 | sed "4,2002d"
Pythonでこれを行うと、何も得られません。
subprocess.call(shlex.split("wget -O c1 --no-cache \"http://some.website/tofile\""))
c1 = open("c1",'w')
first = subprocess.Popen(shlex.split("sed \"1,259d\" c1"), stdout=subprocess.PIPE)
subprocess.Popen(shlex.split("sed \"4,2002d\""), stdin=first.stdout, stdout=c1)
c1.close()
これを行っても結果は得られません。
c1.write(subprocess.Popen(shlex.split("sed \"4,2002d\""), stdin=first.stdout, stdout=subprocess.PIPE).communicate()[0])
「何も得られない」とは、ファイル内の空白の出力を意味します。誰かがここで普通でない何かを見ますか?