0.1.118
This commit is contained in:
parent
5299bb6891
commit
b06c392e7c
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
# replace with your username:
|
# replace with your username:
|
||||||
name = guan
|
name = guan
|
||||||
version = 0.1.117
|
version = 0.1.118
|
||||||
author = guanjihuan
|
author = guanjihuan
|
||||||
author_email = guanjihuan@163.com
|
author_email = guanjihuan@163.com
|
||||||
description = An open source python package
|
description = An open source python package
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Metadata-Version: 2.1
|
Metadata-Version: 2.1
|
||||||
Name: guan
|
Name: guan
|
||||||
Version: 0.1.117
|
Version: 0.1.118
|
||||||
Summary: An open source python package
|
Summary: An open source python package
|
||||||
Home-page: https://py.guanjihuan.com
|
Home-page: https://py.guanjihuan.com
|
||||||
Author: guanjihuan
|
Author: guanjihuan
|
||||||
|
@ -56,6 +56,12 @@ def open_file(filename='a', file_format='.txt', mode='add'):
|
|||||||
f = open(filename+file_format, 'w', encoding='UTF-8')
|
f = open(filename+file_format, 'w', encoding='UTF-8')
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
# 打印到TXT文件
|
||||||
|
def print_to_file(content, filename='print_result', file_format='.txt'):
|
||||||
|
f = open(filename+file_format, 'a', encoding='UTF-8')
|
||||||
|
f.write(content+'\n')
|
||||||
|
f.close()
|
||||||
|
|
||||||
# 读取文本文件内容。如果文件不存在,返回空字符串
|
# 读取文本文件内容。如果文件不存在,返回空字符串
|
||||||
def read_text_file(file_path='./a.txt', make_file=None):
|
def read_text_file(file_path='./a.txt', make_file=None):
|
||||||
import os
|
import os
|
||||||
|
Loading…
x
Reference in New Issue
Block a user