Skip to content

Instantly share code, notes, and snippets.

View dylnmc's full-sized avatar

dylnmc dylnmc

View GitHub Profile
@dylnmc
dylnmc / flies.py
Last active March 20, 2018 14:49
tkinter flies
#! /usr/bin/env python2
"""
This is an interesting script, to say the least, using simple animation in Tkinter.
A few of green circles start positioned at the top-left of the Tkinter panel when it
opens. Then, on a white background, the flies disperse and move in all directions in a
randomized way. If they hit the edge of the screen, they jump backwards as if it
shocked them. The random, even chaotic, movement of the circles makes them appear to be
a lot of flies buzzing around the screen.
@dylnmc
dylnmc / snow.py
Last active May 14, 2024 14:40
tkinter snow
#! /usr/bin/env python2
"""
This is one of the cooler python scripts that uses simple animation in Tkinter.
A bunch of white circles start positioned at the top of the Tkinter panel when it opens.
Then, on a light grey background, the snowflakes gently fall downwards. When they reach
the bottom, they apparently disappear and start back above the top of the screen and
fall back into view. This continuous and soothing snow fall was so relaxing that I made
it open in the background of my mac terminal, which had a transparent background.