Re: urllib.request giving unexpected results

2016-11-16 Thread Chris Angelico
On Wed, Nov 16, 2016 at 7:09 PM, Steven D'Aprano wrote: > I'm trying to download a file using urllib.request and pipe it straight to an > external process. On Linux systems, the following is a test file that > demonstrates the problem: > > > --- cut --- > > #!/usr/bin/python3.5 > > import urllib.r

urllib.request giving unexpected results

2016-11-16 Thread Steven D'Aprano
I'm trying to download a file using urllib.request and pipe it straight to an external process. On Linux systems, the following is a test file that demonstrates the problem: --- cut --- #!/usr/bin/python3.5 import urllib.request import subprocess TEST_URL = 'https://www.irs.gov/pub/irs-prior