No project description provided
Project description
Filekit
简易使用 Python 的文件读写内置模块,针对单词读写操作。省去 open 和 close。
介绍
def read(file_name, encoding='utf-8'):
"""读取文本文件全部内容"""
file = open(file_name, mode='r', encoding=encoding)
text = file.read()
file.close()
return text
如果需要相对复杂操作,请使用原生的 Python 内置读写模块,以获得更可靠和高效的处理。
安装
使用以下命令安装 Filekit:
pip install Filekit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
FileKit-1.0.7.tar.gz
(1.8 kB
view details)
File details
Details for the file FileKit-1.0.7.tar.gz
.
File metadata
- Download URL: FileKit-1.0.7.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3adcf4a4421c397d123afe60e1fe47e1a9a3532d2621bbd7f3bcc07ac44c016 |
|
MD5 | afb0fb89a0395a609f4c38cf16ffdd21 |
|
BLAKE2b-256 | deb865876a2df9fdf5f1604dbeb9182b24f9b48fc2dc08b7619f04233af0cd5c |