我要显示的文件是普通文本文件。
这是我到目前为止编写的代码:
import os
THIS_FOLDER = os.path.dirname(os.path.abspath(__file__))
my_file = os.path.join(THIS_FOLDER,r' C:\Users\dylan\PycharmProjects\Crooms terminal\ Welcome to the crooms terminal.txt')
for name in my_file:
with open(name,"r",encoding="utf8") as f:
frames.append(f.readlines())
print(my_file)
for frame in frames:
print("".join(frame))
这是我要打印的图像
_____ _______ _ _
/ ____| |__ __| (_) | |
| | _ __ ___ ___ _ __ ___ ___ | | ___ _ __ _ __ ___ _ _ __ __ _| |
| | | '__/ _ \ / _ \| '_ ` _ \/ __| | |/ _ \ '__| '_ ` _ \| | '_ \ / _` | |
| |____| | | (_) | (_) | | | | | \__ \ | | __/ | | | | | | | | | | | (_| | |
\_____|_| \___/ \___/|_| |_| |_|___/ |_|\___|_| |_| |_| |_|_|_| |_|\__,_|_|