Skip to content

Commit c0e0945

Browse files
committed
Update FontArt.py
1 parent 7da0be2 commit c0e0945

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Font Art/FontArt.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
import os
1+
import os, platform
22
from pyfiglet import Figlet
3+
34
text = Figlet(font="bubble")
4-
os.system("cls")
5-
os.system("mode con: cols=75 lines=30")
5+
6+
# Clear screen cross-platform
7+
if os.name == "nt":
8+
os.system("cls")
9+
os.system("mode con: cols=75 lines=30")
10+
else:
11+
os.system("clear")
12+
# Terminal resizing is not standard on Unix, so it's usually skipped
613
with open("FontArt.txt", "w") as f:
714
f.write(text.renderText("Randy N"))
815
print(text.renderText("Randy N"))

0 commit comments

Comments
 (0)