pan class="n">pos</span><span class="p">)</span>
        <span class="n">fname</span> <span class="o">=</span> <span class="n">gzipfile</span><span class="o">.</span><span class="n">name</span>
        <span class="k">if</span> <span class="n">fname</span><span class="o">.</span><span class="n">endswith</span><span class="p">(</span><span class="s1">'.gz'</span><span class="p">):</span>
            <span class="n">fname</span> <span class="o">=</span> <span class="n">fname</span><span class="p">[:</span><sp