/
ilya.petrash
/
SimplePyScripts
Обзор
Документация
Войти
/
ilya.petrash
/
SimplePyScripts
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Base64_examples/decode_to_file.py
20 строк
388 B
gil9red
Refactoring. Using black code style
20 апр 2023, 16:54
20 апр 2023, 16:54
48d576f
Код
Авторство
О чём код?
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "ipetrash" from base64 import b64decode def decode_base64_to_file(file_name: str, text_base64: str): with open(file_name, "wb") as f: data = b64decode(text_base64) f.write(data) if __name__ == "__main__": # Hello World! text = "SGVsbG8gV29ybGQh" decode_base64_to_file("result.txt", text)