Kaydet (Commit) c8c6aa20 authored tarafından Eric S. Raymond's avatar Eric S. Raymond

String method cleanup.

üst cafd495d
...@@ -24,7 +24,6 @@ hexbin(inputfilename, outputfilename) ...@@ -24,7 +24,6 @@ hexbin(inputfilename, outputfilename)
import sys import sys
import os import os
import struct import struct
import string
import binascii import binascii
__all__ = ["binhex","hexbin","Error"] __all__ = ["binhex","hexbin","Error"]
...@@ -93,8 +92,7 @@ else: ...@@ -93,8 +92,7 @@ else:
fp = open(name) fp = open(name)
data = open(name).read(256) data = open(name).read(256)
for c in data: for c in data:
if not c in string.whitespace \ if not c.isspace() and (c<' ' or ord(c) > 0177):
and (c<' ' or ord(c) > 0177):
break break
else: else:
finfo.Type = 'TEXT' finfo.Type = 'TEXT'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment