Finding nonprintable characters?
John Baxter
jwbaxter at spamcop.net
Tue Feb 19 23:06:36 EST 2002
In article <mailman.1014145891.20575.python-list at python.org>,
VanL <vlindberg at verio.net> wrote:
> isBinary(filehandle)
On Unix, you execute
file the.unknown.file
and parse the result.
But that's not what you meant.
% file /etc/passwd
/etc/passwd: English text
% file /etc/ssh_host_rsa_key.pub
/etc/ssh_host_rsa_key.pub: ASCII text
% file /bin/sh
/bin/sh: Mach-O executable ppc
And so on, and on.
--John
More information about the Python-list
mailing list