Andrew Robert wrote: > Hi Everyone, > > Is there a way to test if a file is binary or ascii within Python?
try: open(filname).read().decode("ascii") ascii = True except UnicodeError: ascii = False Diez -- http://mail.python.org/mailman/listinfo/python-list