Why "is_zipfile" function of module "zipfile" always returns "false"?
<p>As per the python documentation <a href="http://docs.python.org/2/library/zipfile#zipfile.is_zipfile" rel="nofollow"><code>zipfile.is_zipfile(filename)</code></a> function returns True if filename is a valid ZIP file else False.</p>

<p>I have written my script as below and initially passed one argument and get "False" as result, But for other valid arguments also I am getting <code>False</code> all the time.</p>

<h3>Script:</h3>

<pre><code>import zipfile

for filename in [ r'D:\Python_Programs\B1', r'D:\Python_Programs\B2', r'D:\Python_Programs\B1+B2\20130105\144145_1.zip', 'NEWS.txt']:
    print (filename, zipfile.is_zipfile(filename))
</code></pre>

<h3>Result:</h3>

<pre><code>D:\Python_Programs\B1 False
D:\Python_Programs\B2 False
D:\Python_Programs\B1+B2\20130105\144145_1.zip False
NEWS.txt False
</code></pre>

<p>Can anyone help me out why I am getting False every time??</p>
