Testing for file type

Laurent Pointal laurent.pointal at limsi.fr
Mon May 22 10:38:12 EDT 2006


Andrew Robert a écrit :
> Hi Everyone,
> 
> Is there a way to test if a file is binary or ascii within Python?
> 
> I'd prefer not to text against file extension.
> 
> Any help you can provide would be greatly appreciated.

May look at unix "file" command sources...


A+

L.Pointal.



More information about the Python-list mailing list