Skip to content

Commit 21283c4

Browse files
committed
Add inspired by reference for istext funcs
1 parent b5262e2 commit 21283c4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tue_get/util/grep.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
import os
33
import re
44

5+
"""
6+
Text functions inspired by https://eli.thegreenplace.net/2011/10/19/perls-guess-if-file-is-text-or-binary-implemented-in-python
7+
"""
8+
59
text_characters = b"".join(map(lambda x: bytes((x,)), range(32, 127))) + b"\n\r\t\f\b"
610
_null_trans = bytes.maketrans(b"", b"")
711

0 commit comments

Comments
 (0)