[OSM-dev] Problems with planet files and bz2
olt at omniscale.de
Wed Mar 2 06:38:03 GMT 2011
On 02.03.2011, at 00:34, Eric Wolf wrote:
> Yep. That is the problem. Figured it out from both sides of the equation.
> As of Python 2.7.1 and 3.2, the BZ2File object type does not support reading multi-stream bz2 files, like those generated by pbzip2.
> I'm going to have to look into another solution.
You can use these lines:
p = subprocess.Popen(['bunzip2', '-c', filename], bufsize=-1, stdout=subprocess.PIPE)
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt
More information about the dev