comparison cutils/util/__init__.py @ 164:a813094ae4f5

Move PY2 from cutils.util.constants into cutils.util
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 09 Jan 2025 13:48:57 +0100
parents fa7dd54e9715
children ed45abb4940f
comparison
equal deleted inserted replaced
163:fa7dd54e9715 164:a813094ae4f5
5 # :- 5 # :-
6 r"""Utility package. 6 r"""Utility package.
7 7
8 """ 8 """
9 9
10 __all__ = ["normalize_filename", 10 __all__ = ["PY2",
11 "normalize_filename",
11 "argv2algo", 12 "argv2algo",
12 "algotag2algotype", 13 "algotag2algotype",
13 "get_blake2b", 14 "get_blake2b",
14 "get_blake2b_256", 15 "get_blake2b_256",
15 "get_blake2s", 16 "get_blake2s",
18 19
19 20
20 import argparse 21 import argparse
21 import hashlib 22 import hashlib
22 import os 23 import os
24 import sys
25
26
27 PY2 = sys.version_info[0] < 3
23 28
24 29
25 def get_blake2b(): 30 def get_blake2b():
26 """Get the factory for blake2b""" 31 """Get the factory for blake2b"""
27 try: 32 try: