We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7da0be2 commit c0e0945Copy full SHA for c0e0945
Font Art/FontArt.py
@@ -1,8 +1,15 @@
1
-import os
+import os, platform
2
from pyfiglet import Figlet
3
+
4
text = Figlet(font="bubble")
-os.system("cls")
5
-os.system("mode con: cols=75 lines=30")
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
13
with open("FontArt.txt", "w") as f:
14
f.write(text.renderText("Randy N"))
15
print(text.renderText("Randy N"))
0 commit comments