File tree Expand file tree Collapse file tree
script_library/scripts/basic Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # -*- coding: utf-8 -*-
3+ """
4+ ASCII 艺术示例:纯文本炫酷输出
5+
6+ 在控制台用字符画出图案,无需图片即可做出视觉效果。
7+ 可配合 Rich 的彩色输出进一步美化。
8+ """
9+
10+ # Python IDE Logo 风格
11+ logo = r'''
12+ ____ _ _ ____ ___ __ __ ____
13+ | _ \ _ _| |_| |__ ___ _ __ | _ \_ _| \/ | _ \
14+ | |_) | | | | __| '_ \ / _ \| '_ \ | | | | || |\/| | | | |
15+ | __/| |_| | |_| | | | (_) | | | | | |_| | || | | | |_| |
16+ |_| \__, |\__|_| |_|\___/|_| |_| |____/___|_| |_|____/
17+ |___/
18+ '''
19+
20+ # 装饰边框
21+ def box (text , width = 40 ):
22+ lines = text .strip ().split ("\n " )
23+ top = "+" + "-" * (width - 2 ) + "+"
24+ result = [top ]
25+ for line in lines :
26+ result .append ("| " + line [:width - 4 ].ljust (width - 4 ) + " |" )
27+ result .append (top )
28+ return "\n " .join (result )
29+
30+ print (logo )
31+ print ("PythonIDE - 移动端 Python 编程环境" )
32+ print ()
33+ print (box ("支持 Python · JavaScript · HTML 预览\n 内置 AI 助手 · 丰富扩展库" ))
You can’t perform that action at this time.
0 commit comments