[Python-ideas] os.path.isbinary

Ryan rymg19 at gmail.com
Wed Jul 31 17:40:03 CEST 2013


Here's something more interesting than my shlex idea.

os.path is, pretty much, the Python FS toolbox, along with shutil. But, there's one feature missing: check if a file is binary. It isn't hard, see http://code.activestate.com/recipes/173220/. But, writing 50 lines of code for a more common task isn't really Python-ish.

So...

What if os.path had a binary checker that works just like isfile:
os.path.isbinary('/nothingness/is/eternal') # Returns boolean

It's a thought...
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130731/15e1ae1c/attachment.html>


More information about the Python-ideas mailing list