REDROOM
PHP 8.5.2
Path:
Logout
Edit File
Size: 2.16 KB
Close
/lib/python3/dist-packages/netaddr/compat.py
Text
Base64
#----------------------------------------------------------------------------- # Copyright (c) 2008 by David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #----------------------------------------------------------------------------- """ Compatibility wrappers providing uniform behaviour for Python code required to run under both Python 2.x and 3.x. All operations emulate 2.x behaviour where applicable. """ import sys as _sys if _sys.version_info[0] == 3: # Python 3.x specific logic. _sys_maxint = _sys.maxsize _int_type = int _str_type = str _bytes_type = lambda x: bytes(x, 'UTF-8') _is_str = lambda x: isinstance(x, (str, type(''.encode()))) _is_int = lambda x: isinstance(x, int) _callable = lambda x: hasattr(x, '__call__') _dict_keys = lambda x: list(x.keys()) _dict_items = lambda x: list(x.items()) _iter_dict_keys = lambda x: x.keys() def _bytes_join(*args): return ''.encode().join(*args) def _zip(*args): return list(zip(*args)) def _range(*args, **kwargs): return list(range(*args, **kwargs)) _iter_range = range def _iter_next(x): return next(x) elif _sys.version_info[0:2] > [2, 3]: # Python 2.4 or higher. _sys_maxint = _sys.maxint _int_type = (int, long) _str_type = basestring _bytes_type = str _is_str = lambda x: isinstance(x, basestring) _is_int = lambda x: isinstance(x, (int, long)) _callable = lambda x: callable(x) _dict_keys = lambda x: x.keys() _dict_items = lambda x: x.items() _iter_dict_keys = lambda x: iter(x.keys()) def _bytes_join(*args): return ''.join(*args) def _zip(*args): return zip(*args) def _range(*args, **kwargs): return range(*args, **kwargs) _iter_range = xrange def _iter_next(x): return x.next() else: # Unsupported versions. raise RuntimeError( 'this module only supports Python 2.4.x or higher (including 3.x)!') try: from importlib import resources as _importlib_resources except ImportError: import importlib_resources as _importlib_resources
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 5 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
contrib
DIR
-
drwxr-xr-x
2026-01-08 12:56:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
eui
DIR
-
drwxr-xr-x
2026-01-08 12:56:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ip
DIR
-
drwxr-xr-x
2026-01-08 12:56:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
strategy
DIR
-
drwxr-xr-x
2026-01-08 12:56:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-01-08 12:56:25
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
cli.py
1.25 KB
lrw-r--r--
2020-06-22 10:41:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
compat.py
2.16 KB
lrw-r--r--
2020-06-23 10:05:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
core.py
5.76 KB
lrw-r--r--
2020-06-15 16:03:00
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fbsocket.py
8.05 KB
lrw-r--r--
2020-06-22 10:41:23
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
1.81 KB
lrw-r--r--
2020-07-03 14:41:59
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).