Last active
July 21, 2025 09:49
-
-
Save internetimagery/a60d3e3dc000aa7ee083e02e24404574 to your computer and use it in GitHub Desktop.
loading animation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import sys | |
| anim = ( | |
| "\r| |", | |
| "\r| |", | |
| "\r| |", | |
| "\r| |", | |
| "\r| |", | |
| "\r} |", | |
| "\r|} |", | |
| "\r| > |", | |
| "\r| -- |", | |
| "\r| -- |", | |
| "\r| -- |", | |
| "\r| --- |", | |
| "\r| --- |", | |
| "\r| ---- |", | |
| "\r| ---- |", | |
| "\r| --=|", | |
| "\r| }|", | |
| "\r| : |", | |
| "\r| . |", | |
| "\r| |", | |
| "\r| |", | |
| "\r| |", | |
| "\r| |", | |
| "\r| _|", | |
| "\r| _____|", | |
| "\r| __________|", | |
| "\r| _________________|", | |
| "\r| __________________________|", | |
| "\r| _____________________________________|", | |
| "\r|_________________________________________________|", | |
| "\r|_________________________________________________|", | |
| "\r|_______________________________________ |", | |
| "\r|____________________________ |", | |
| "\r|___________________ |", | |
| "\r|__________ |", | |
| "\r|____ |", | |
| "\r|_ |", | |
| "\r| |", | |
| "\r| |", | |
| ) | |
| for i in range(10): | |
| for frame in anim: | |
| sys.stdout.write(frame) | |
| time.sleep(0.1) | |
| sys.stdout.write("\r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import sys | |
| anim = ( | |
| r"""| . """, | |
| r"""| . """, | |
| r"""| . """, | |
| r"""| . """, | |
| r"""/ . """, | |
| r"""/. """, | |
| r"""|. """, | |
| r"""\, """, | |
| r"""--; """, | |
| r"""-- * """, | |
| r"""-- " """, | |
| r"""-- " """, | |
| r"""-- ' """, | |
| r"""-- ' """, | |
| r"""-- ' """, | |
| r"""-- ` """, | |
| r"""-- ` """, | |
| r"""-- ; """, | |
| r"""\ , """, | |
| r"""\ . """, | |
| r"""\ . """, | |
| r"""\ . """, | |
| r"""\ . """, | |
| r"""\ . """, | |
| r"""\ . """, | |
| r"""| .""", | |
| r"""| .""", | |
| r"""| .""", | |
| r"""| .""", | |
| r"""| .""", | |
| r"""| .""", | |
| r"""| .""", | |
| ) | |
| for i in range(10): | |
| for frame in anim: | |
| sys.stdout.write("\r{} ".format(frame)) | |
| time.sleep(0.1) | |
| sys.stdout.write("\r") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment