wexpect-venv/dump_logs.py

17 lines
329 B
Python
Raw Permalink Normal View History

2020-02-01 20:34:34 +00:00
import os
import glob
2020-02-04 08:46:07 +00:00
read_files = []
2020-02-04 08:34:00 +00:00
2020-02-04 08:46:07 +00:00
read_files += glob.glob("*.log")
read_files += glob.glob(".wlog/*.log")
read_files += glob.glob("tests/.wlog/*.log")
2020-02-04 08:34:00 +00:00
2020-02-04 08:46:07 +00:00
read_files.sort(key=lambda x: os.path.getmtime(x))
2020-02-01 20:34:34 +00:00
for f in read_files:
2020-02-04 08:34:00 +00:00
print()
print(f)
print()
2020-02-01 20:34:34 +00:00
with open(f, "r") as infile:
print(infile.read())