knify 1.8.45__tar.gz → 1.8.47__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.45 → knify-1.8.47}/PKG-INFO +1 -1
- knify-1.8.47/knify/fileutil.py +13 -0
- {knify-1.8.45 → knify-1.8.47}/knify/help.py +1 -1
- {knify-1.8.45 → knify-1.8.47}/knify.egg-info/PKG-INFO +1 -1
- knify-1.8.45/knify/fileutil.py +0 -13
- {knify-1.8.45 → knify-1.8.47}/LICENSE +0 -0
- {knify-1.8.45 → knify-1.8.47}/README.md +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/__init__.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/dateutil.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/listutil.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/logger.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/objutil.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/threadutil.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify/warnutil.py +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.45 → knify-1.8.47}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.45 → knify-1.8.47}/setup.cfg +0 -0
- {knify-1.8.45 → knify-1.8.47}/setup.py +0 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env python
|
2
|
+
# -*- coding:utf-8 -*-
|
3
|
+
# Author: qicongsheng
|
4
|
+
|
5
|
+
|
6
|
+
def read_to_string(file_path: str, encoding: str = 'utf-8') -> str:
|
7
|
+
with open(file_path, 'r', encoding=encoding) as file:
|
8
|
+
return file.read()
|
9
|
+
|
10
|
+
|
11
|
+
def read_lines(file_path: str, encoding: str = 'utf-8', trim: bool = True) -> list[str]:
|
12
|
+
with open(file_path, 'r', encoding=encoding) as file:
|
13
|
+
return [line_.strip() for line_ in file.readlines()] if trim else file.readlines()
|
knify-1.8.45/knify/fileutil.py
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
# -*- coding:utf-8 -*-
|
3
|
-
# Author: qicongsheng
|
4
|
-
|
5
|
-
|
6
|
-
def read_to_string(file_path_: str, encoding_: str = 'utf-8') -> str:
|
7
|
-
with open(file_path_, 'r', encoding=encoding_) as file:
|
8
|
-
return file.read()
|
9
|
-
|
10
|
-
|
11
|
-
def read_lines(file_path_: str, encoding_: str = 'utf-8', trim: bool = False) -> list[str]:
|
12
|
-
with open(file_path_, 'r', encoding=encoding_) as file:
|
13
|
-
return [line_.strip() for line_ in file.readlines()] if trim else file.readlines()
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|