Repositories
Help
py.lib
Commits
Files
Yohn Y.
2021-11-27
Parent:
cab7fedf8432
22:7e0e6ee3031b
Go to Latest
py.lib/webapp/tool/url.py
. Переписываем slog_syslogger.py согласно текущему состоянию языка
Download raw file
View source
Diff to previous
Annotate
History
Loading...
1
# -*- coding: utf-8 -*-
2
# ---
3
# Инструменты для работы с URL
4
# ---
5
from
base64
import
urlsafe_b64encode
as
_b64e
,
urlsafe_b64decode
as
_b64d
6
from
urllib.parse
import
quote
as
urlquote
7
8
def
encode
(
buf
):
9
return
_b64e
(
buf
.
encode
(
'UTF-8'
))
.
decode
(
'UTF-8'
)
10
11
def
decode
(
buf
):
12
return
_b64d
(
buf
.
encode
(
'UTF-8'
))
.
decode
(
'UTF-8'
)