<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Tomeu,<br>
<br>
The zipfile.is_zipfile(filename) method solved my problem. I was able
to successfully share a Zip file between two computers running my
activity. Still some kinks to iron out, though. I'll keep your
suggestion in mind for the future.<br>
<br>
Thanks,<br>
<br>
James Simmons<br>
<br>
<br>
Tomeu Vizoso wrote:<br>
<blockquote
cite="mid242851610803191524o5df9f458u4e49e05d3df3b7f5@mail.gmail.com"
type="cite">
<pre wrap="">On Wed, Mar 19, 2008 at 11:08 PM, James Simmons
<a class="moz-txt-link-rfc2396E" href="mailto:jim.simmons@walgreens.com"><jim.simmons@walgreens.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Tomeu and Michael,
It turns out Python has a method you can pass a filename to and it will
identify if the file is a Zip file or not, based on the "magic number", not
the filename. It seems to do the trick.
</pre>
</blockquote>
<pre wrap=""><!---->
As a rule of thumb, I would first try to get a mime-type I can trust,
and only if I cannot (I get for example application/octet-stream), I
would try to sniff the type.
But in your case you may be right by just sniffing it.
Tomeu
</pre>
</blockquote>
<br>
</body>
</html>