[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Determine mime type of a file
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 2 May 2011 14:46:40 +0200
On Mon, May 2, 2011 at 11:22 AM, Dirk Laurie <email@example.com> wrote:
> Unfortunately io.popen "is system dependent and is not available on
> all platforms."
Well, all _desktop_ platforms, certainly (it can be dodgy on Windows
with GUI subsystem applications). But then there's always os.execute()
+ redirection to a temp file.
Adrian has a good suggestion, but it seems easier to parse the output
of 'file' than to do a library binding.