<!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 and Michael,<br>
<br>
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.<br>
<br>
Thanks,<br>
<br>
James Simmons<br>
<br>
Tomeu Vizoso wrote:<br>
<blockquote
cite="mid242851610803191348yd659a76hb438bc2698ca3869@mail.gmail.com"
type="cite">
<pre wrap="">On Wed, Mar 19, 2008 at 9:43 PM, Michael Stone <a class="moz-txt-link-rfc2396E" href="mailto:michael@laptop.org"><michael@laptop.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On Tue, Mar 18, 2008 at 09:18:05AM -0500, James Simmons wrote:
> how can I tell what kind of file I am receiving when
> someone shares a file with me?
You might examine python's mimetypes module or the 'file' command.
</pre>
</blockquote>
<pre wrap=""><!---->
I think you can also add that mime type to the tube's metadata and
read it from the receiving side?
Tomeu
</pre>
</blockquote>
<br>
</body>
</html>