8
怎么用变量接收 INFO WARNING 信息
source link: https://www.v2ex.com/t/880733
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
def pdf2word(file_path):
file_name = file_path.split('.')[0]
doc_file = f'{file_name}.docx'
p2w = Converter(file_path)
p2w.convert(doc_file, multiprocessing=True, start=0, end=None, )
p2w.close()
return doc_file
新手,最近在学习,有个问题,就是调用这个函数的时候,会输出 INFO WARNING 等 logging 信息到控制台,那问题是怎么用一个变量接收到这些信息,让可以 print()
file_name = file_path.split('.')[0]
doc_file = f'{file_name}.docx'
p2w = Converter(file_path)
p2w.convert(doc_file, multiprocessing=True, start=0, end=None, )
p2w.close()
return doc_file
新手,最近在学习,有个问题,就是调用这个函数的时候,会输出 INFO WARNING 等 logging 信息到控制台,那问题是怎么用一个变量接收到这些信息,让可以 print()
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK